安卓工作室 android studio文件和代码模板,以及汉化出错问题

作者:韩梦飞沙

Author:han_meng_fei_sha

邮箱:313134555@qq.com

E-mail: 313134555 @qq.com

android studio 汉化后,报错。

无法为bundle java util属性资源包找到资源,关键的emmet bem类名称元素分隔符

Can't find resource for bundle java.util.PropertyResourceBundle, key emmet.bem.class.name.element.separator.label

捆bundle

某resource不在此文件中,对应的key为 emmet.bem.class.name.element.separator.label

BEM的意思就是块(block)、元素(element)、修饰符(modifier)

<form class="search-form">
<input type="text" class="search-form__username">
<input type="password" class="search-form__password">
<button id="J_Submit" class="search-form__submit--active"></button> <form>

这里的B,指的是Block,也就是"search-form"
这里的E,指的是Element,也就是跟随在search-form后的"username", "password"和"submit",并且用两个下划线(__)表示承接关系
这里的M,指的是Modifier,也就是submit后面的"active",用两个连接符表示承接关系(--

Emmet  是一个网页前端开发工具。

Espresso 是个编辑器,Sublime Text 就是个编辑器。

==========详细信息:

Can't find resource for bundle java.util.PropertyResourceBundle, key emmet.bem.class.name.element.separator.label
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key emmet.bem.class.name.element.separator.label
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at com.intellij.application.options.emmet.XmlEmmetConfigurable.$$$setupUI$$$(XmlEmmetConfigurable.java)
at com.intellij.application.options.emmet.XmlEmmetConfigurable.<init>(XmlEmmetConfigurable.java:55)
at com.intellij.codeInsight.template.emmet.generators.XmlZenCodingGeneratorImpl.createConfigurable(XmlZenCodingGeneratorImpl.java:155)
at com.intellij.application.options.emmet.EmmetConfigurableProvider.getAvailableConfigurables(EmmetConfigurableProvider.java:41)
at com.intellij.application.options.emmet.EmmetConfigurableProvider.createConfigurable(EmmetConfigurableProvider.java:31)
at com.intellij.openapi.options.ConfigurableEP$ProviderProducer.createElement(ConfigurableEP.java:326)
at com.intellij.openapi.options.ConfigurableEP.createConfigurable(ConfigurableEP.java:273)
at com.intellij.openapi.options.ex.ConfigurableWrapper.createConfigurable(ConfigurableWrapper.java:54)
at com.intellij.openapi.options.ex.ConfigurableWrapper.getConfigurable(ConfigurableWrapper.java:121)
at com.intellij.openapi.options.ex.ConfigurableWrapper.cast(ConfigurableWrapper.java:102)
at com.intellij.openapi.options.ex.ConfigurableWrapper$CompositeWrapper.getConfigurables(ConfigurableWrapper.java:256)
at com.intellij.openapi.options.newEditor.SettingsTreeView$MyNode.buildChildren(SettingsTreeView.java:473)
at com.intellij.ui.treeStructure.CachingSimpleNode.getChildren(CachingSimpleNode.java:36)
at com.intellij.ui.treeStructure.SimpleTreeStructure.getChildElements(SimpleTreeStructure.java:25)
at com.intellij.ui.treeStructure.filtered.FilteringTreeStructure.addToCache(FilteringTreeStructure.java:67)
at com.intellij.ui.treeStructure.filtered.FilteringTreeStructure.addToCache(FilteringTreeStructure.java:82)
at com.intellij.ui.treeStructure.filtered.FilteringTreeStructure.addToCache(FilteringTreeStructure.java:82)
at com.intellij.ui.treeStructure.filtered.FilteringTreeStructure.rebuild(FilteringTreeStructure.java:62)
at com.intellij.ui.treeStructure.filtered.FilteringTreeStructure.<init>(FilteringTreeStructure.java:54)
at com.intellij.ui.treeStructure.filtered.FilteringTreeStructure.<init>(FilteringTreeStructure.java:45)
at com.intellij.ui.treeStructure.filtered.FilteringTreeBuilder.<init>(FilteringTreeBuilder.java:53)
at com.intellij.openapi.options.newEditor.SettingsTreeView$MyBuilder.<init>(SettingsTreeView.java:804)
at com.intellij.openapi.options.newEditor.SettingsTreeView.<init>(SettingsTreeView.java:207)
at com.intellij.openapi.options.newEditor.SettingsEditor.<init>(SettingsEditor.java:149)
at com.intellij.openapi.options.newEditor.SettingsDialog.<init>(SettingsDialog.java:70)
at com.intellij.ide.actions.ShowSettingsUtilImpl.getDialog(ShowSettingsUtilImpl.java:57)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:94)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:62)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:197)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:156)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:211)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$2(ActionMenuItem.java:304)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:627)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

=============

文件模板 file Templates

检查描述 inspection Descriptions

打算描述 intention Descriptions

后缀模板 postfix Templates

=======

ResourceBundle类是java提供的一个读取properties文件(配置文件)的一种方法。

文件中以#开头做为注释,下面是我的数据库连接的配置文件

========

#数据库配置信息
DRIVER=com.mysql.jdbc.Driver
URL=jdbc:mysql://localhost:3306/test
user=rwuser
password=rwuser
 
#路径配置信息
path=D:\\Java\\jdk1.6.0_31\\bin
========
 
下面是我使用ResourceBundle类处理:
========
package iceinfo.bat.test;
 
import java.util.ResourceBundle;
 
public class TestResourceBundle {
 
    public static void main(String[] args) {
        String fileName="config";
//        config.properties它跟普通java类的命名规则完全一样:   
//        - 文件名和包名是区分大小写   
//        - 扩展名 .properties 省略 
//        - 资源文件必须位于classpath下,如果在某个包下成在定义fileName时要加上包的名称,且包名区分大小写   
//        如果是Web项目,不写包路径可以,此时将资源文件放在WEB-INF\classes\目录下就可以。
        ResourceBundle paramBundle = ResourceBundle.getBundle(fileName);
        System.out.println(paramBundle.getString("DRIVER"));
        System.out.println(paramBundle.getString("URL"));
        System.out.println(paramBundle.getString("user"));
        System.out.println(paramBundle.getString("PASSWORD"));//这儿是区分大小写的
         
        System.out.println(paramBundle.getString("path"));
    }
}

==========

注:如果fileName的名字中大小写或没有加入properies文件所在的包名那么会报
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name config1, locale zh_CN
如果在获取properties文件中的key对应的value值时如果没有区分小写会报
Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key PASSWORD
=======
 
emmet.bem.class.name.element.separator.label
 
如何在很多文件中 查找
 

点击组织-文件夹选项

点到搜索选项卡,选中下面的始终搜索文件名和内容,并点击确定

如何搜索文件内容在哪个文件中_百度经验

searchableOptions.xml

然而,这种搜索,对 txt这样的后缀有效。 对其他的 比如.properties 后缀。是无效的。 .properties这种文件里的内容是不会被搜索的。要想搜索,就把后缀改成txt。

======

我们发现 汉化的 文件 ActionsBundle.properties 少了很多语句。 所以出现了上面的问题。 对比原来的文件,将必要的语句加上就可以了。

安卓工作室 android studio文件和代码模板,以及汉化出错问题的更多相关文章

  1. 安卓工作室 android studio 汉化后,报错。 设置界面打不开。Can't find resource for bundle java.util.PropertyResourceBundle, key emmet.bem.class.name.element.separator.label

    安卓工作室 android studio 汉化后,报错. 设置界面打不开. Android studio has been sinified and reported wrong.The setup ...

  2. 安卓工作室Android Studio 快捷键

    安卓工作室Android Studio 快捷键 Alt+回车 导入包,自动修正 Ctrl+N   查找类 Ctrl+Shift+N 查找文件 Ctrl+Alt+L  格式化代码 Ctrl+Alt+O ...

  3. 安卓工作室 android studio 的 汉化 美化 定制 Android studio's Chinesization beautification customization

    安卓工作室 android studio 的 汉化 美化 定制 Android studio's Chinesization beautification customization 汉化包 百度云盘 ...

  4. 安卓工作室 Android studio 或 Intellij IDEA 美化 修改 汉化 酷炫 装逼 Android studio or Intellij IDEA beautify modify Chinesization cool decoration

    安卓工作室 Android studio 或 Intellij IDEA 美化 修改 汉化 酷炫 装逼 Android studio or Intellij IDEA beautify modify ...

  5. 安卓工作室android studio 美化 ,设置背景图片。

    作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 313134555 @qq.com sexy Editor 点击file-> ...

  6. 安卓工作室 android studio 谷歌账号 登录

    作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 313134555 @qq.com 登录你的谷歌账号,开始 添加 云功能 到你的 ...

  7. 使用DevExpress官方汉化文件对界面进行汉化的过程

    在较早期的Dev开发中,基本上都是在使用一个DLL包的汉化文件,如基于13.1的汉化包文件Dxper.LocalizationCHS.Win.v13.1.5.dll,这个汉化包也比较方便,大多数时候复 ...

  8. Android开发学习1----AndroidStudio的安装、创建第一个Android Studio文件、Android Studio界面介绍和HelloWord!

    移动开发的工具有很多:Android Studio,eclipse,Hbuilder等,其中,现如今最火的开发工具是Android Studio,Android Studio是谷歌自己推出的一款集成开 ...

  9. Android Studio安卓学习笔记(一)安卓与Android Studio运行第一个项目

    一:什么是安卓 1.Android是一种基于Linux的自由及开放源代码的操作系统. 2.Android操作系统最初由AndyRubin开发,主要支持手机. 3.Android一词的本义指“机器人”, ...

随机推荐

  1. Docker容器命令

    ★根本前提:本地主机有镜像才能创建容器 ⒈docker run [Options] 镜像名称或镜像ID [Command] [Arg...] 用途:利用镜像创建容器实例 Options说明(常用):注 ...

  2. ubuntu 安装lightgbm

    前提:安装好git.cmake 1. 安装lightgbm git clone --recursive https://github.com/Microsoft/LightGBM 2. 编译 下载好的 ...

  3. ftpdata目录下日期目录权限问题

    由于APP Server由root用户启动,创建目录默认为root:root用户:用户组权限 需chown -R wingupload ftpdata执行后,WING才能上传成功 或者写成脚本,每天凌 ...

  4. vim常用命令总结 (转)【转】

    转自:https://www.cnblogs.com/yangjig/p/6014198.html 在命令状态下对当前行用== (连按=两次), 或对多行用n==(n是自然数)表示自动缩进从当前行起的 ...

  5. OA协同办公软件

    OA协同办公软件: 泛微软件. 九思软件. 华天动力. 万户OA.:北京万户网络技术有限公司创立于1998年2月,是北京华宇软件股份有限公司(股票简称:“华宇软件”,股票代码:300271)的全资子公 ...

  6. mybatis主键自增长

    在数据库中建序列:SEQ_T_RESOURCE 第一种:会在传入该方法的的参数集合中添加主键元素,相当于:map.put("RES_ID",xxx); <insert id= ...

  7. nodejs前端开发环境安装

    1.       nodejs安装 要求:node版本6.2.0及以上,npm版本3.8.9及以上 Nodejs安装包地址: 2.    在rTools上下载并安装git 3.    在rTools上 ...

  8. Java使用google开源工具Thumbnailator实现图片压缩

    <dependency> <groupId>net.coobird</groupId> <artifactId>thumbnailator</ar ...

  9. 常见的js算法

    参考地址:链接

  10. Python 3 官方文档学习(1)

    本文系官方文档翻译之作,不当之处,敬请原谅! range()函数 如果需要遍历一个数字序列,可以使用内置的range函数.该函数会生成等差序列. 1 2 3 range(5)# 范围[0, 5) ra ...