android混淆代码 闪退,android 3.2.2版本官方demo,一混淆就运行闪退

24282d26459655f79c1c56bca1099802.png

我就把project.properties的这行#proguard.config=proguard-project.txt的#号去掉

官方文档的

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

-dontwarn com.hyphenate.**

也没什么用

下面是官方demo里面的混淆规则。。。。我原封不动,没修改过

# This is a configuration file for ProGuard.

# http://proguard.sourceforge.net/index.html#manual/usage.html

-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-verbose

-dontwarn

# 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

-dontpreverify

# 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.

-keepattributes *Annotation*

-keep public class com.google.vending.licensing.ILicensingService

-keep public class com.android.vending.licensing.ILicensingService

# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native

-keepclasseswithmembernames class * {

native ;

}

# 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);

}

# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations

-keepclassmembers enum * {

public static **[] values();

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

}

-keep class * implements android.os.Parcelable {

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

}

-keepclassmembers class **.R$* {

public static ;

}

-keep class android.support.v4.** {*;}

-keep class org.xmlpull.** {*;}

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

-keep public class * extends com.umeng.**

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

-keep class com.squareup.picasso.* {*;}

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

-keep class com.hyphenate.chat.** {*;}

-keep class org.jivesoftware.** {*;}

-keep class org.apache.** {*;}

#另外,demo中发送表情的时候使用到反射,需要keep SmileUtils,注意前面的包名,

#不要SmileUtils复制到自己的项目下keep的时候还是写的demo里的包名

-keep class com.hyphenate.chatuidemo.utils.SmileUtils {*;}

#2.0.9后加入语音通话功能,如需使用此功能的api,加入以下keep

-keep class net.java.sip.** {*;}

-keep class org.webrtc.voiceengine.** {*;}

-keep class org.bitlet.** {*;}

-keep class org.slf4j.** {*;}

-keep class ch.imvs.** {*;}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值