2014年7月23日 星期三

Android 開發 (五十九) Eclipse with ProGuard

在 crashlytics 介紹中有提到如何使用crashlytics,但是在經過proguard之後,所有的crash

log都被混淆無法判斷錯誤的來源,要如何解決這個問題呢?

crashlytics的網站中有提到相關的解法


如下

Eclipse with ProGuard

Crashlytics automatically de-obfuscates stack traces in your crash reports. You’ll never manually retrace a stack trace or hunt around for a lost mapping file again!
For Crashlytics to provide the most informative stack traces, add the following line to your ProGuard configuration file:
-keepattributes SourceFile,LineNumberTable
When building for release with Eclipse, export your application to an APK using the “Export Crashlytics-enabled Android Application” exporter from the Eclipse export menu. Just go to File -> Export -> Android :)
This exports your application using the standard ADT Android Application exporter and then uploads the ProGuard-generated mappings file to our servers.
If you make release builds using the command line, please see the appropriate article for your build system:

沒有留言:

張貼留言