APP签名打包时遇到的问题
16lz
2021-12-04
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>
更多相关文章
- Cygwin 下编译Jni生成So文件时报错Could not find application p
- android 从tomcat读取文件出错:connect failed: ECONNREFUSED
- Android(安卓)ndk“Unresolved inclusion: ”
- Invoke-customs are only supported starting with Android(安卓
- android studio3.6.3编译Telegram android 1482 问题小记(nebula
- Android(安卓)7.1 源码编译
- 编译 Android版本的Openal方式
- android ndk 编译 libcurl
- 如何在android画分析图(例如 柱状图、趋势图、饼图)