Proguard with Crashlytics

偶尔善良 提交于 2019-12-23 09:35:14

问题


We have added crashlytics in our android application, and we are using proguard. So, as the crashlytics documentation says, we have added the following code in our proguard configuration file:

-keep class com.crashlytics.** { *; }
-keep class com.crashlytics.android.**
-keepattributes SourceFile,LineNumberTable *Annotation*

Unfortunately, when we sign the APK, we get the following error:

java.io.IOException: proguard.ParseException: Unknown option '*Annotation*' 

What are we doing wrong?

Thanks in advance


回答1:


Try This ProGuard rules

# Crashlytics
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
-keepattributes SourceFile,LineNumberTable,*Annotation*
-keep class com.crashlytics.android.**

And please make sure that ,s are in place.



来源:https://stackoverflow.com/questions/34750823/proguard-with-crashlytics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!