Android程序进行混淆,在导出签名apk包时出错!
今天终于完成了近一个月的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包时出错!的更多相关文章
- VS 中NuGet 尝试还原程序包时出错"*"已拥有为"**"定义的依赖项
之前从Git检出项目以后,项目编译不能通过,发现是缺少依赖的外部插件,于是通过NuGet去获取项目依赖的插件,如何通过NuGet恢复使用的插件请使用NuGet还原项目插件. 但是就是在使用NuGet还 ...
- android studio 代码混淆如何忽略第三方jar包
日前在打包混淆包含第三方jar包的Android studio项目时 报出了各种错误,但是debug版本却能正常运行,于是怀疑android studio 打包的时候把第三方jar包给混淆了,第三方j ...
- Xcode9 打包ipa(导出ipa测试包)时总是意外退出
今天用xcode9,打包ipa总是意外退出. 正处在测试阶段,所以打的也是测试包 ,路径是:Product -> Archive -> Export -> Save for Ad H ...
- eclipse导出签名apk的混淆设置
1.设置project.properties文件: 2.设置proguard-project.txt文件:
- 两个android程序间的相互调用(apk互调)
通常我们用到的只是activity之间的互相跳转和调用,很少会用到apk级别的互相调用. 往往在一些应用上会用到,比如一个支付系统,可能会有很多的一系列的程序调用到:彩票系统.订票系统.团购网……全部 ...
- Android studio使用心得(二)— 打包签名apk发布
1.—–Android Studio菜单 Build->Generate Signed APK 2.——Create new.. 3.——-跟eclipse里面一样,添加keystore 信 ...
- 将android程序中的数据库导出到SD卡
private void copyDBToSDcrad() { String DATABASE_NAME = "数据库文件名"; String oldPath = "da ...
- Android实现应用下载并自动安装apk包
安装: ? 1 2 3 4 5 String str = "/CanavaCancel.apk"; String fileName = Environment.getExterna ...
- myeclipse10.7导出war包时出错解决办法
myeclipse10.7的版本破解后,导出war包时报“SECURITY ALERT: INTEGERITY CHECK ERROR”的错误. 选中项目->export->java ee ...
随机推荐
- C# 在类中反射
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Wind ...
- perl 模块安装
You can check if you have them installed in your machine with: > perl -e 1 -M<module> It wi ...
- Javascript知识点记录(三)设计模式
Javascript设计模式记录,这个方面确实是没写过,工作中也没有用到js设计模式的地方. prototype与面向对象取舍 使用prototype原型继承和使用面向对象,都可以实现闭包的效果.那么 ...
- session 和 cookie区别
1.存在位置cookie是储存在客服端,session是存在服务器端的文件系统/数据库/memcache 2.安全性 session是储存在服务器端,安全性高一些, 3.网络传输量 cookie通过 ...
- 面试题目——《CC150》高等难题
面试题18.1:编写一个函数,将两个数字相加.不得使用+或其他算数运算符. package cc150.high; public class Add { public static void main ...
- CLion 2016.1.1 下载 附注册激活码 破解版方法
http://www.520xiazai.com/soft/CLion-2016.1.1.html CLion 2016.1.1 下载 附注册激活码 破解版方法 注册破解方法:在要求输入注册的界面选择 ...
- 添加删除表格append或 createElement
方法一: js代码:增加一行五列的表格 function AddList(){ $len= document.getElementsByName('goods_name[]').length; obj ...
- EF 增删改
一.新增 UserInfo user = new UserInfo() { UserName = "jamsebing", UserPass = " }; db.User ...
- 创立一个网站的前前后后(起因,域名,云平台,备案,CDN等等)(1)
起因 写完<完美软件开发:方法与逻辑>这书后,原本想继续写书的,可出来参加了些社区活动后,我发现我写的书大家评价还行,但其实不太理解.而接下来想写的书更加抽象点,准备叫<管理的解析& ...
- R语言爬虫初尝试-基于RVEST包学习
注意:这文章是2月份写的,拉勾网早改版了,代码已经失效了,大家意思意思就好,主要看代码的使用方法吧.. 最近一直在用且有维护的另一个爬虫是KINDLE 特价书爬虫,blog地址见此: http://w ...