私はアプリケーションにACRAを統合して、ベータスタジアムで私のアプリからクラッシュレポートを取得しました。バグを修正したり、コード内のエラーを見つけたりできます。これをエミュレータで実行すると、すべて正常に動作し、ACRAは起動しています。 Android Toolsでアプリケーションの署名付きパッケージをエクスポートすると、ExceptionInInitializeErrorが発生し、アプリケーションが強制的にデバイス上で閉じられます。私がこのエラーをキャッチし、ACRAなしで進めると、アプリケーション自体が魅力的なように動作します...
誰もここにACRAと同じ問題がありますか?それはProGuardと何か関係があるのだろうか?私はProGuardのACRAホームページへの方法に従っていましたが、これについて何か不足していますか?
私のproguard.cfgは次のようになります。
-injars 'C:\ Workspaces \ motodevWs \ gp2012 \ bin \ classes'
-injars 'C:\ Workspaces \ motodevWs \ gp2012 \ libs'
-outjars 'C:\ Workspaces \ motodevWs \ gp2012 \ bin \ classes-processed.jar'
-libraryjars 'C:\android\android-sdk\platforms\android-7\android.jar'
-libraryjars 'C:\android\android-sdk\add-ons\addon_google_apis_google_inc_7 \libs\maps.jar'
-optimizations !code/simplification/arithmetic
-allowaccessmodification
-repackageclasses ''
-keepattributes *Annotation*,SourceFile,LineNumberTable,*Annotation*
-renamesourcefileattribute SourceFile
-dontpreverify
-dontwarn java.awt.**,javax.security.**,java.beans.**,com.sun.**
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.view.View {
public (android.content.Context);
public (android.content.Context,android.util.AttributeSet);
public (android.content.Context,android.util.AttributeSet,int);
public void set*(...);
}
-keepclasseswithmembers class * {
public (android.content.Context,android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public (android.content.Context,android.util.AttributeSet,int);
}
-keepclassmembers class * extends android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}
-keepclassmembers class **.R$* {
public static ;
}
# keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'.
# Note: if you are removing log messages elsewhere in this file then this isn't necessary
-keep class org.acra.ACRA {
;
;
}
# keep this around for some enums that ACRA needs
-keep class org.acra.ReportingInteractionMode {
;
;
}
# keep this otherwise it is removed by ProGuard
-keep public class org.acra.ErrorReporter {
public void addCustomData(java.lang.String,java.lang.String);
}
# keep this otherwise it is removed by ProGuard
-keep public class org.acra.ErrorReporter {
public org.acra.ErrorReporter$ReportsSenderWorker handleSilentException(java.lang.Throwable);
}
PROBLEM SOLVED!
After some effort on research and rethinking my problem I found the solution to the problem and it was indeed in my proguard.cfg
file where I missed something!
何とか私はenumを保持しないように管理しました。
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
私の proguard.cfg
とすべてが完璧に動作しています!