Android 混淆及项目发布
来源:互联网 发布:万界淘宝商txt下载 编辑:程序博客网 时间:2024/05/16 19:27
Android代码混淆及项目发布步骤记录
http://blog.csdn.net/u011638883/article/details/26349215
android混淆-关于依赖第三方库
http://my.oschina.net/u/1402271/blog/184130android 混淆文件proguard.cfg详解
http://blog.csdn.net/laoyao_moyan/article/details/7353768
Android 混淆代码总结
http://blog.csdn.net/lovexjyong/article/details/24652085
# To enable ProGuard in your project, edit project.properties# to define the proguard.config property as described in that file.## Add project specific ProGuard rules here.# By default, the flags in this file are appended to flags specified# in ${sdk.dir}/tools/proguard/proguard-android.txt# You can edit the include path and order by changing the ProGuard# include property in project.properties.## For more details, see# http://developer.android.com/guide/developing/tools/proguard.html# Add any project specific keep options here:# If your project uses WebView with JS, uncomment the following# and specify the fully qualified class name to the JavaScript interface# class:#-keepclassmembers class fqcn.of.javascript.interface.for.webview {# public *;#}####################################################################################通用###################################################################################-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*-optimizationpasses 5-allowaccessmodification-dontpreverify-dontoptimize-dontshrink# The remainder of this file is identical to the non-optimized version# of the Proguard configuration file (except that the other file has# flags to turn off optimization).# #混淆时不会产生形形色色的类名 ##-dontusemixedcaseclassnames# #指定不去忽略非公共的库类 ##-dontskipnonpubliclibraryclasses-dontskipnonpubliclibraryclassmembers-keepattributes Signature-keepattributes *Annotation*-keepattributes Exceptions,InnerClasses,Signature-keepattributes SourceFile,LineNumberTable-verbose-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.widget.BaseAdapter-keep public class * extends android.content.BroadcastReceiver-keep public class * extends android.database.sqlite.SQLiteOpenHelper-keep public class * extends android.content.ContentProvider-keep public class * extends android.app.backup.BackupAgentHelper-keep public class * extends android.preference.Preference-keep public class * extends android.support.v4.app.Fragment-keep public class * extends android.support.v4.app.FragmentActivity-keep public class * extends android.support.v4.** -keep interface android.support.v4.app.** { *; } -keep public class com.google.vending.licensing.ILicensingService-keep public class com.android.vending.licensing.ILicensingService-keep public class android.accessibilityservice.**{*;}############################-keep public class * extends toolkit.android.SQLiteCipherDbHelper-keep public class * extends toolkit.android.SQLiteNormalDbHelper-keep public class * extends net.sqlcipher.database.SQLiteOpenHelper-keep public class * extends com.glenet.hm.activity.BaseActivity-keep public class * extends com.glenet.hm.fragment.BaseFragment-keep public class * extends yjc.toolkit.app.ToolkitApplication-keep public class * extends com.glenet.hm.adapter.SimpleBaseAdapter#-keep class yjc.toolkit.** {*;}-keep class net.sqlcipher.** {*;}#-keep class toolkit.android.sqlite.** {*;}########################## For native methods, see http://proguard.sourceforge.net/manual/examples.html#native##【保护指定的类和类的成员的名称,如果所有指定的类成员出席(在压缩步骤之后)】#-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 *;}-keepclasseswithmembers class * { public <init>(android.content.Context);}-keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet);}-keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int);} # keep setters in Views so that animations can still work.# see http://proguard.sourceforge.net/manual/examples.html#beans-keepclassmembers public class * extends android.view.View { void set*(***); *** get*();} # We want to keep methods in Activity that could be used in the XML attribute onClick-keepclassmembers class * extends android.app.Activity { public void *(android.view.View);}# The support library contains references to newer platform versions.# Don't warn about those in case this app is linking against an older# platform version. We know about them, and they are safe. -keep class * extends android.view.View{*;}-keep class * extends android.app.Dialog{*;}-keep class * implements java.io.Serializable{*;}-keep public class com.glenet.hm.R$*{ public static final int *;}-keep public class yjc.toolkit.R$*{ public static final int *;}-keepclassmembers class com.glenet.hm.R$* { *;}-keepclassmembers class **.R$* { *;}####################################################################################用于指定程序中用到的jar文件#(可以看到引用的Library Project不需包含,#因为他们已经在project.properties文件中指定了)。####################################################################################-ignorewarnings-libraryjars libs/android-support-v4.jar-libraryjars libs/mframework.jar-libraryjars libs/ShareSDK-Core-2.3.12.jar-libraryjars libs/ShareSDK-QQ-2.3.12.jar-libraryjars libs/ShareSDK-QZone-2.3.12.jar-libraryjars libs/ShareSDK-Renren-2.3.12.jar-libraryjars libs/ShareSDK-SinaWeibo-2.3.12.jar-libraryjars libs/ShareSDK-TencentWeibo-2.3.12.jar-libraryjars libs/ShareSDK-Wechat-2.3.12.jar-libraryjars libs/ShareSDK-Wechat-Core-2.3.12.jar-libraryjars libs/ShareSDK-Wechat-Moments-2.3.12.jar-libraryjars libs/umeng-analytics-v5.2.3.jar-libraryjars libs/universal-image-loader-1.9.2-SNAPSHOT-with-sources.jar-libraryjars libs/umeng-fb-v4.3.2.jar-libraryjars E:\02_Dev_workspace\workspace\Toolkit.Sqlcipher\libs\guava-r09.jar-libraryjars E:\02_Dev_workspace\workspace\Toolkit.Sqlcipher\libs\commons-codec.jar#-libraryjars libs\guava-r09.jar#-libraryjars libs\commons-codec.jar####################################################################################用于表示保留(不混淆)引用的jar包中的内容。#必須啊 必須啊###################################################################################-keep class android.support.v4.** {*;}-keep class cn.sharesdk.onekeyshare.** {*;}-keep class cn.sharesdk.** {*;}-keep class com.sina.**{*;}-keep class **.R$* {*;}-keep class **.R{*;}-dontwarn cn.sharesdk.**-dontwarn **.R$*-keep class com.umeng.analytics.** {*;}-keep class com.umeng.fb.** {*;}-keep class com.google.common.** {*;}-keep class org.apache.commons.codec.** {*;}-keep class m.framework.** {*;}-keep class com.nostra13.universalimageloader.** {*;}-keep class com.handmark.pulltorefresh.** {*;}#-keep class com.tencent.** {*;}#-dontwarn demo.**#-keep class demo {*;} -dontwarn android.support.v4.** -dontwarn com.google.common.** # -dontwarn com.handmark.pulltorefresh.**-keep public class com.umeng.fb.ui.ThreadView {} ####################################################################################用于表示保留本地的bean文件下的实体类不被混淆。###################################################################################-keep class com.glenet.hm.xml.** {*;}####################################################################################保留本地涉及反射的类不被混淆####################################################################################-keep class com.wly.xxx.tool.DbModelUtils{*;}#-keep class com.wly.xxx.tool.JsonUtils{*;}-keep class javax.annotation.**{*;}-keep class java.lang.reflect.**{*;}-keepclassmembers class * { public <init>(org.json.JSONObject);}####################################################################################处理Web JS与本地原生组件之间的调用过程不被混淆。#####################################################################################-keep class com.wly.xxx.activity.InsuranceQuotesActivity##-keep public class com.wly.xxx.activity.InsuranceQuotesActivity$MyJavaScriptInterface##-keep public class * implements com.wly.xxx.activity.InsuranceQuotesActivity$MyJavaScriptInterface##-keepclassmembers class com.wly.xxx.activity.InsuranceQuotesActivity$MyJavaScriptInterface {## public *;## private *;##}
0 0
- Android 混淆及项目发布
- Android代码混淆及项目发布步骤记录
- Android代码混淆及项目发布步骤记录
- Android代码混淆及项目发布方法记录
- Android代码混淆及项目发布步骤记录
- Android代码混淆及项目发布步骤记录
- Android项目打包发布的混淆配置
- android 混淆发布jar
- android程序的ProGuard混淆及签名发布
- Android Studio混淆与发布
- Android打包签名混淆发布
- Proguard混淆Android项目所遇问题及总结
- Android项目:proguard混淆之常见问题及解决方法汇总
- Android项目代码混淆
- Android项目代码混淆
- Android 项目代码混淆
- Android项目代码混淆
- Android 项目代码混淆
- 用java程序把本地的一个文件拷贝到hdfs上并显示进度
- 键盘键和键盘键控制值一览表(键盘按键对应代码表)
- [深入浅出Cocoa]Block编程值得注意的那些事儿
- Date.UTC()返回1970年1月1日午夜之间的毫秒数
- Linux命令行技巧
- Android 混淆及项目发布
- oracle查看数据库名和实例名
- poj 2773 Happy 2006(欧拉函数应用)
- HD 2503 a/b + c/d
- C语言宏中#、##的用法详解
- TOJ 2773. Fruit Trees 简单的BFS
- Android网络编程(下)--- 框架AsyncHttpClient/上传文件
- _T("")宏的由来和ANSI和UNICODE编码
- Java对象分配内存时的内存图