Advanced Setup |
-keep class com.crashlytics.** { *; } -dontwarn com.crashlytics.**これでビルド速度が速くなるので、アプリの公開やテストを早めることができます。
Exclude Crashlytics with ProGuardTo skip running ProGuard on Crashlytics, just add the following to your ProGuard config file.-keep class com.crashlytics.** { *; } -dontwarn com.crashlytics.**This will help speed up your builds so that you can ship and test even faster. |
Using the Privacy DialogBy default, this feature is disabled. When a crash occurs in any version of your app, this will ask your users if that crash should be reported. Our analytics data shows that most users will decline to report crashes, so we recommend leaving this disabled. If you’d like to enable it, you can do it in your app settings page. |
strings.xml
file with all the string resource names we’ll look for and some example values:
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="com.crashlytics.CrashSubmissionPromptTitle"> Send Crash Report?</string> <string name="com.crashlytics.CrashSubmissionPromptMessage"> Looks like we crashed! Please help us fix the problem by sending a crash report.</string> <string name="com.crashlytics.CrashSubmissionSendTitle"> Send</string> <string name="com.crashlytics.CrashSubmissionAlwaysSendTitle"> Always Send</string> <string name="com.crashlytics.CrashSubmissionCancelTitle"> Don't Send</string> </resources>
Localizing the DialogTo localize the dialog, create localized string resources with some specific names. Here’s astrings.xml file with all the string resource names we’ll look for and some example values:
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="com.crashlytics.CrashSubmissionPromptTitle"> Send Crash Report?</string> <string name="com.crashlytics.CrashSubmissionPromptMessage"> Looks like we crashed! Please help us fix the problem by sending a crash report.</string> <string name="com.crashlytics.CrashSubmissionSendTitle"> Send</string> <string name="com.crashlytics.CrashSubmissionAlwaysSendTitle"> Always Send</string> <string name="com.crashlytics.CrashSubmissionCancelTitle"> Don't Send</string> </resources> |
プロジェクトではなくプロジェクトで使っているライブラリ内にCrashlytics キットを設置したい場合、基本となるプロジェクトをセットアップした後に変更を加えます。
注意: Fabric.withをアプリのonCreate()内ではなくライブラリ内で初期化したい場合、Fabric.withをライブラリ内に移動させてください。
Setting up a Library Subproject in EclipseIf you want the Crashlytics Kit to be in a library your project is using instead of your project, after setting up your base project, make these additional changes.
Note: If you want Fabric.with initialized in your library instead of your project’s onCreate(), move Fabric.with into the library. |