Android: AS gen singned apk problem

在近期将AS升级到最新,各类插件也都升级到最新。java

在打包程序的时候 发现编译脚本检查更细致了。apache

程序忽然报错编译不过了。spa

 

1,[unchecked] .net

提示我: 将object 强制转换为具体类型:插件

解决方法: 在方法前添加翻译

@SuppressWarnings("unchecked") 解决;

 

2, 曾经在Viewgroup 的child 中,为child 设置了id (非R.id.xxx)orm

如今编译报错:blog

提示erro expected resouce of type idit

解决办法:方法前添加io

@SuppressWarnings("ResourceType")

 

3,部分语言未翻译

在Android SDK Tool r19以后, Export的时候遇到xxx is not translated in yyy, zzz的问题。

例如说"auto_name" is not translated in zh, zh_CN.

这是由于Android SDK Tool 將 ANDROID_LINT_COMPLETE_REGIONS 改成了须要检查。

个人解决办法是: 修吧。

 

问题根源:

传送:

http://blog.csdn.net/u012264122/article/details/39371343

 

 

4,proguard warnings:

Error:Execution failed for task ':carl_media:transformClassesAndResourcesWithProguardForRelease_Release'.
> java.io.IOException: Please correct the above warnings first.

 

十几个warnings。 醉了。

《《传送

依照以往的管理,warn将其忽略就行了。可是如今不能忽略,影响打包的正常进行。

在官网找到这么一句话,Manual -> Troubleshooting -> “Warning: can’t find referenced class”,“try your luck with the -ignorewarnings option, or even the -dontwarn option”。

打开proguard-rules.txt,加入-dontwarn org.apache.http.**便可。

从新执行Generate Signed APK,打包成功!

》》》》

-dontwarn 指定报名下 再也不提示warning 。

如今:打包成功。

。。。

相关文章
相关标签/搜索