android学习经验

真机调试出现“很抱歉 xxxx已停止运行”必定是代码错误,某大神说的。比如我调试


button = (Button)findViewById(R.id.button1);
写成button = (Button)findViewById(android.R.id.button1);就错了,但编译通过。

*************************************************

中文汉字乱码问题:

IDE显示在file-->setting--->appearance改个中文字体和complier--->file encodings下全部相关改utf8即可,注意最最下面还有一个propertiesfile要改动

 

已验证:编译中文问题要先做上面的设置,在项目-->src里的build.grandle 文件中(注意不是解决方案下gradle下那个!!!)添加一段代码即可

  tasks.withType(Compile) {
  options.encoding = "UTF-8"
  }

posted on 2015-06-15 13:43  youzhu  阅读(55)  评论(0)    收藏  举报