Question

I am using famous ACRA Error reporting tool to send crash logs to document which I have uploaded on my Google Doc.

I have followed all below steps mentioned in

https://github.com/ACRA/acra/wiki/BasicSetup

But still my application does not send error reports to document which I have uploaded.

I could see following error logs generated by ACRA.

01-01 02:11:19.995: E/ACRA(6054): ACRA caught a RuntimeException exception for com.example.arcasample. Building report.

Below is my source code which I believe is flawless.

MyApplication.java

package com.example.arcasample;

import org.acra.ACRA;
import org.acra.ErrorReporter;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;

@ReportsCrashes(formKey = "XXXX")
public class MyApplication extends Application 
{

    @Override
    public void onCreate()
    {
        // ErrorReporter.getInstance().init(this); This is not helping me
        ACRA.init(this);
        super.onCreate();
    }

}

MainActivity.java

package com.example.arcasample;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends Activity 
{

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        int a = 10 / 0; <= This will cause crash.

        Log.i("vipul", "" + a);
    }

}

manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.arcasample"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name="MyApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.arcasample.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Can someone please let me know if I am missing anything.

Thanks in advance.

Was it helpful?

Solution

Well I tried deleting form created on Google docs and recreated it.I wonder what mistake i had done before?.

Anyways recreating form and carefully noting down form key resolved my issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top