android打包引用第三方jar出现的错误
2014-12-30 13:32
267 查看
今天终于完成了近一个月的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
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
相关文章推荐
- android打包引用第三方jar出现的错误
- android打包引用第三方jar出现的错误
- android打包签名时出现conversion to Dalvik format failed with error 1错误
- Android调用webservice引用第三方jar包ksoap2混淆打包问题处理
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- android打包时出现Conversion to Dalvik format failed with error 1错误
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android打包出现形如“Dx bad class file magic (cafebabe) or version (0033.0000)1”的错误的原因及其解决办法
- 开发中碰到的问题:Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arab
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- android 打包出现错误
- Google Gson 加入到Android中, 打包编译混淆签名之后出现的错误
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android应用程序打包时,出现错误:Android Lint "app_name" is not translated in "af" (Afrikaans), "am" (Amharic), "
- Android打包APK的时候出现conversion to dalvik format failed with error 1错误!
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- 解决android应用引用第三方jar包混淆打包报错
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- 引用Android Design包出现的错误
- [android引用他人包出现的错误]All versions of the libraries must be the same at this time.以及It is indirectly re