首页 技术 正文
技术 2022年11月15日
0 收藏 393 点赞 4,742 浏览 1348 个字

今天终于完成了近一个月的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

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,990
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,504
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,348
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,132
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,765
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,843