Android程序进行混淆,在导出签名apk包时出错!
2014-12-21 19:02
489 查看
http://blog.csdn.net/diruser/article/details/7969120
今天终于完成了近一个月的App开发工作,对程序进行混淆导出签名apk包时,却出现了如下的错误:
Proguard returned with error code 1. See console
Note: there were 4 duplicate class definitions.
Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
。。。
心里想着,真是好事多磨呀!
那就赶紧问度娘呀,终于在一位网友那里找到了答案。
对于Android导入了第三方jar包时,proguard混淆脚本会出现错误,而出现上面的错误是因为程序中引入了第三方jar包[ksoap2-android-assembly-2.6.5-jar-with-dependencies.jar],二话不说,立马行动:
在proguard-project.txt中增加了
-ignorewarnings
-libraryjars lib/ksoap2-android-assembly-2.5.4-jar-with-dependencies.jar (jar包路径)
即在文件中增加了如下红色的两行:
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-ignorewarnings
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
#-dontoptimize
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.
-libraryjars libs/ksoap2-android-assembly-2.6.5-jar-with-dependencies.jar
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
最后,重新打包,一切OK。
今天终于完成了近一个月的App开发工作,对程序进行混淆导出签名apk包时,却出现了如下的错误:
Proguard returned with error code 1. See console
Note: there were 4 duplicate class definitions.
Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
。。。
心里想着,真是好事多磨呀!
那就赶紧问度娘呀,终于在一位网友那里找到了答案。
对于Android导入了第三方jar包时,proguard混淆脚本会出现错误,而出现上面的错误是因为程序中引入了第三方jar包[ksoap2-android-assembly-2.6.5-jar-with-dependencies.jar],二话不说,立马行动:
在proguard-project.txt中增加了
-ignorewarnings
-libraryjars lib/ksoap2-android-assembly-2.5.4-jar-with-dependencies.jar (jar包路径)
即在文件中增加了如下红色的两行:
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-ignorewarnings
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
#-dontoptimize
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.
-libraryjars libs/ksoap2-android-assembly-2.6.5-jar-with-dependencies.jar
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
最后,重新打包,一切OK。
相关文章推荐
- Android程序进行混淆,在导出签名apk包时出错!
- Android程序进行混淆,在导出签名apk包时出错!
- Android程序进行混淆,在导出签名apk包时出错!
- Android程序进行混淆,在导出签名apk包时出错!
- Android程序进行混淆,在导出签名apk包时出错!但是,javascript还是有问题
- Android程序进行混淆,在导出签名a… 分类: Android开发 2014-05-30 10:58 47人阅读 评论(0) 收藏
- Android程序进行混淆,在导出签名a…
- android 导出签名APK--混淆文件proguard.cfg详解
- android apk 导出(签名) is not translated in xx 代码混淆 反编译
- android 导出签名APK--混淆文件proguard.cfg详解
- android 导出签名APK--混淆文件proguard.cfg详解
- android 导出签名APK--混淆文…
- android apk 导出(签名) is not translated in xx 代码混淆 反编译
- 【export apk】android程序签名打包导出详解
- Android 升级ADT-22.01 后混淆导出APK真机运行FC出错问题解决
- android apk文件导出(签名版)
- android之APK打包代码混淆签名加密
- Android导出加签名的APK文件的方法
- (转) Android生成签名文件并用其对apk文件进行签名
- 在对android APK进行签名的过程中,我碰到过几种不同的问题: