ProGuard和Crashlytics [英] Proguard with Crashlytics

查看:632
本文介绍了ProGuard和Crashlytics的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经在我们的Andr​​oid应用程序添加Crashlytics,我们正在使用ProGuard。因此,随着crashlytics文件说,我们已经添加了以下code在我们的ProGuard配置文件:

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*

可惜的是,当我们签署APK,我们得到以下错误:

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

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

什么是我们做错了什么?

What are we doing wrong?

在此先感谢

推荐答案

试试这个ProGuard的规则

Try This ProGuard rules

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

和请确保是到位。

这篇关于ProGuard和Crashlytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆