1,【Android】Error: Expected resource of type styleable [ResourceType]

解决办法
解决办法就是在使用 TypedArray 的方法处,加上 @SuppressWarnings(“ResourceType”) ,这样即可过滤该警告,可以正常通过签名编译。例如:

@SuppressWarnings("ResourceType")public void initView() {    TypedArray ta = mContext.obtainStyledAttributes(attrs);    boolean hasBottomLine = ta.getBoolean(0, false);    boolean hasTopLine = ta.getBoolean(1, false);    ta.recycle();}

2,Error:(3) Error: “app_name” is not translated in “de” (German), “es” (Spanish), “fr” (French), “hu” (Hungarian), “ja” (Japanese), “ko” (Korean) [MissingTranslation]

解决办法
在出错的资源文件 标签里面添加属性
xmlns:tools=”http://schemas.android.com/tools” tools:ignore=”MissingTranslation”
例如

"http://schemas.android.com/tools" tools:ignore="MissingTranslation">    <string name="app_name">string>    <string name="action_settings">Settingsstring>    <string name="hello_world">Hello world!string>    <item name="tag_id" type="id">item>

更多相关文章

  1. Cygwin 下编译Jni生成So文件时报错Could not find application p
  2. android 从tomcat读取文件出错:connect failed: ECONNREFUSED
  3. Android(安卓)ndk“Unresolved inclusion: ”
  4. Invoke-customs are only supported starting with Android(安卓
  5. android studio3.6.3编译Telegram android 1482 问题小记(nebula
  6. Android(安卓)7.1 源码编译
  7. 编译 Android版本的Openal方式
  8. android ndk 编译 libcurl
  9. 如何在android画分析图(例如 柱状图、趋势图、饼图)

随机推荐

  1. Android(安卓)Studio入门小例子
  2. android按键模拟测试
  3. android 里面的测量单位
  4. Android录制视频,可限制时长,限大小
  5. android四种不同的事件实现
  6. Utilize Avahi Libraries in Android(安
  7. Android:入门级Android开发者应该知道的
  8. Unity3d - Android(安卓)Build : Android
  9. Android2.2 官方下载地址
  10. android日历实现__GO桌面版&&开源收藏版