Reputation: 2187
I have a weird problem. My application classes onCreate (or onReusume) is never called. Even if i deinstall the app and debug agan. Here is my code. I cannot find any strange in it. If I set a breaktpoint it is never reached and other classes tell me that the init fails. Tanks
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);
}
this is my 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> ...
Upvotes: 2
Views: 1492
Reputation: 2928
Change this it will work
@Override
public void onCreate() {
// The following line triggers the initialization of ACRA
ACRA.init(this);
super.onCreate();
}
you forget to call super.onCreate();
Upvotes: 4