混淆——proguard.cfg文件
来源:互联网 发布:大话数据库在线 编辑:程序博客网 时间:2024/05/21 11:12
1、proguard.cfg / proguard-project.txt 文档内容如下(或者自己把下面代码复制到 这2个文件中):
-optimizationpasses 5-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-verbose-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*-keep public class * extends android.app.Activity-keep public class * extends android.app.Application-keep public class * extends android.app.Service-keep public class * extends android.content.BroadcastReceiver-keep public class * extends android.content.ContentProvider-keep public class com.android.vending.licensing.ILicensingService-keepclasseswithmembernames class * { native <methods>;}-keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet);}-keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int);}-keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String);}-keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *;}
2、proguard.cfg 与 proguard-project.txt
在老版本的 ADT 中,创建 Android工程时候会自动生成 proguard.cfg,project.properties 文档;
但是在新版本的 ADT推出之后(具体哪个版本开始推出 暂不清楚),创建时生成了 proguard-project.txt 、project.properties 文档,来替换它。
3、启动 Proguard 混淆 Android程序
在project.properties 文件中添加
proguard.config=proguard-project.txt (现在版本)
或
proguard.config=proguard.cfg(老版本)
Project 上右键,选择“Android Tools”——Export Signed Application Package……
(即可生成 被 Proguard 混淆过的 APK文件)
4、参考文献
http://bbs.pediy.com/showthread.php?t=137112
0 0
- 混淆——proguard.cfg文件
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- Android:混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解 .
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- Android混淆文件proguard.cfg解析
- android开发混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- Android:混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- appium简明教程(10)——控件定位基础
- NGS项目二:提高数据信息收集整合能力
- 【leetcode】Linked List Cycle II
- [oc学习日记]单例模式
- Java读取属性文件
- 混淆——proguard.cfg文件
- 发现一个大牛Scott Lowe博客
- 使用Nginx+FFMPEG搭建HLS直播转码服务器
- 国生教育:自考必看的临场得分策略
- 学习数据库无法正常启动,修改Undo表空修复法
- appium简明教程(11)——使用resource id定位(仅支持安卓4.3以上系统)
- 在 jboss-5.1.0.GA中编写 会话Bean和MDB
- php面向对象(OOP)—抽象方法和抽象类
- Flex组件的项目渲染器(ItemRenderer)使用总结