android 混淆打包教程,Android 混淆打包
发布日期:2021-10-31 14:06:59 浏览次数:3 分类:技术文章

修改project.properties文件

[html]

#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

去掉之前的#,即取消注释

修改proguard-project.txt文件(忽略第三方jar)

引入第三方库:

-libraryjars /libs/umeng_sdk.jar

忽略类:

-keep class com.umeng.** {*;}

[java]

-optimizationpasses 7

-dontskipnonpubliclibraryclasses

-dontskipnonpubliclibraryclassmembers

-dontpreverify

-verbose

-allowaccessmodification

-repackageclasses

-dontusemixedcaseclassnames

-dontoptimize

-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 com.android.vending.licensing.ILicensingService

-libraryjars /libs/umeng_sdk.jar

-keep class com.umeng.** {*;}

-keepclasseswithmembernames class * {

native ;

}

-keepclasseswithmembers class * {

public (android.content.Context, android.util.AttributeSet);

}

-keepclasseswithmembers class * {

public (android.content.Context, android.util.AttributeSet, int);

}

-keepclassmembers class * extends android.app.Activity {

public void *(android.view.View);

}

-keepclassmembers enum * {

public static **[] values();

public static ** valueOf(java.lang.String);

}

-keep class * implements android.os.Parcelable {

public static final android.os.Parcelable$Creator *;

}

-optimizationpasses 7

-dontskipnonpubliclibraryclasses

-dontskipnonpubliclibraryclassmembers

-dontpreverify

-verbose

-allowaccessmodification

-repackageclasses

-dontusemixedcaseclassnames

-dontoptimize

-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 com.android.vending.licensing.ILicensingService

-libraryjars /libs/umeng_sdk.jar

-keep class com.umeng.** {*;}

-keepclasseswithmembernames class * {

native ;

}

-keepclasseswithmembers class * {

public (android.content.Context, android.util.AttributeSet);

}

-keepclasseswithmembers class * {

public (android.content.Context, android.util.AttributeSet, int);

}

-keepclassmembers class * extends android.app.Activity {

public void *(android.view.View);

}

-keepclassmembers enum * {

public static **[] values();

public static ** valueOf(java.lang.String);

}

-keep class * implements android.os.Parcelable {

public static final android.os.Parcelable$Creator *;

}

配置好混淆,最后打包项目:

4dff34ffe1cc0166a351f975eaa86f97.png

http://www.dengb.com/Androidjc/539335.htmlwww.dengb.comtruehttp://www.dengb.com/Androidjc/539335.htmlTechArticle修改project.properties文件 [html] #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}/tools/proguard/proguard-androi...

上一篇:lbe android,LBE安全大师极速版
下一篇:android 上传图片给js,安卓中HTML5图片上传实例详解