Reputation: 1302
I found this wonderful library https://github.com/ACRA/acra for Crash Report Tracking. I have imported the jar file into my project and added the ACRA.init to my current application.
public class AppController extends Application {
.......
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
ACRA.init(this);
}
<application
android:name="com.mobiledev.Synergy.control.AppController"
android:label="@string/app_name">
And every time I run the app I get this error.
STACK_TRACE=android.content.ActivityNotFoundException: Unable to find explicit activity class {com.mobiledev.Synergy/org.acra.CrashReportDialog}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1556)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1431)
at android.app.ContextImpl.startActivity(ContextImpl.java:1054)
at android.app.ContextImpl.startActivity(ContextImpl.java:1043)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:283)
at org.acra.ErrorReporter.notifyDialog(ErrorReporter.java:757)
at org.acra.ErrorReporter$4.run(ErrorReporter.java:732)
I guess I need to include the CrashReportDialog Activity from the acra jar files. But how should I do it? Thanks guys,
Upvotes: 2
Views: 913
Reputation: 2397
I just faced the exact same issue and resolved it like this:
(workspaceroot)\(yourapppath)\build.gradle
file
compile files('libs/acra-4.(version).jar')
with
compile 'ch.acra:acra:4.7.0'
Regards,
S.
Upvotes: 0
Reputation: 4284
You need to add the following xml code in your manifest file
<activity android:name="org.acra.CrashReportDialog"
android:theme="@android:style/Theme.Dialog"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
Upvotes: 2