奇妙な問題があります。私のアプリケーションクラスonCreate(またはonReusume)は呼び出されません。アプリを削除してデバッグをやり直しても。これが私のコードです。そこには奇妙なものは何も見つかりません。ブレークポイントを設定した場合、それは到達せず、他のクラスはinitが失敗することを教えてくれます。戦車
package com.MyApp;
import org.acra.*;
import org.acra.annotation.*;
import android.app.Application;
@ReportsCrashes(formKey = ".................")
public class MyApp extends Application {
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
public void onCreate() {
// The following line triggers the initialization of ACRA
if (!BuildConfig.DEBUG) {
ACRA.init(this);
}
これは私のxmlです:
<application
android:name="com.MyApp.MyApp"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/Theme" >
<activity android:name="com.MyApp.MyApp.MainActivity" >
<intent-filter> ...