android中的代码混淆
2016-06-02 11:15
489 查看
代码混淆应注意,保留不被混淆的第三方jar包以及工具类
在project.properties中修改一下几点
proguard.config=proguard-project.txt
android.library.reference.1=../../æžå®¢å¦é™¢å¦ä¹ 代ç /demo-project-eclipse-master/IMKit/src/main
//在proguard-project文件中配置一下文件
在project.properties中修改一下几点
proguard.config=proguard-project.txt
Project target.
target=android-14android.library.reference.1=../../æžå®¢å¦é™¢å¦ä¹ 代ç /demo-project-eclipse-master/IMKit/src/main
//在proguard-project文件中配置一下文件
# 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 *; #} -keep class org.apache.**{ *; } -keep class com.baidu.**{ *; } -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -ignorewarnings -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keepattributes *Annotation* -keepattributes Signature -keep public class * extends android.app.Fragment -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 * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class * extends android.support.v4.** -keep public class com.android.vending.licensing.ILicensingService -keep class com.baidu.** { *; } -keep class vi.com.gdi.bgl.android.**{*;} #主类继承的Activity -keep class * extends com.lcjl.autolayout.AutoLayoutActivity #封装类避免被混淆 -keep class com.example.bean.** { *; } -dontoptimize -dontpreverify #极光推送 -dontwarn cn.jpush.** -keep class cn.jpush.** { *; } -dontwarn com.google.** -keep class com.google.gson.** {*;} -keep class com.google.protobuf.** {*;} #自己定义的回调接口 #自己定义的工具类 -keepclasseswithmembers class com.example.utils.**{ <fields>; <methods>; } -keepclassmembers class fqcn.of.javascript.interface.for.webview { public *; } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } #融云服务 -keepattributes Exceptions,InnerClasses -keep class io.rong.** {*;} -keep class * implements io.rong.imlib.model.MessageContent{*;} -keepattributes Signature -keepattributes *Annotation* -keep class sun.misc.Unsafe { *; } -keep class com.google.gson.examples.android.model.** { *; } -keepclassmembers class * extends com.sea_monster.dao.AbstractDao { public static java.lang.String TABLENAME; } -keep class **$Properties -dontwarn org.eclipse.jdt.annotation.** -keep class com.ultrapower.** {*;} #第三方类库避免混淆 -libraryjars ..\PullRefreshLibrary -dontwarn com.handmark.pulltorefresh.library.** -keep class com.handmark.pulltorefresh.library.** { *;}
相关文章推荐
- Android APK反编译图文教程
- Android应用开发之代码混淆
- Android实用图文教程之代码混淆、第三方平台加固加密、渠道分发
- 【转+原】Android代码反编译及分析
- android 代码混淆
- Android studio使用笔记。。。
- 代码混淆的基本原理和方法
- 关于vs2010下.net4.0 C#代码的混淆--网上各种破解版混淆工具的使用记录
- android代码混淆
- Android Studio的代码混淆
- android proguard conversion to dalvik format failed with error 1
- 代码混淆
- Android使用ProGuard进行代码混淆
- Android代码混淆的注意事项
- Android proguard 详解
- 【Android 应用开发】 Android APK 反编译 混淆 反编译后重编译
- Android Studio多渠道批量打包及代码混淆
- Android代码混淆及反编译
- 【proguard】使用proguard混淆代码出现“Conversion to Dalvik format failed with error 1”错误的解决方法
- 【Proguard】android 中 Proguard 使用