3

I am trying to send crash reports to email but when my app crashes nothing happens. I tried messing around with configurations but i just kept getting errors (unknown member mostly, wth that is). Here's my code for the class.

    @ReportsCrashes(
    mailTo = "me@gmail.com")
public class MyApplication extends Application
{
    @Override
    public void onCreate() {
        super.onCreate();

        // The following line triggers the initialization of ACRA
        ACRA.init(this);
    }
}

My manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ghostdevelopment.ueni2"
    android:versionCode="1"
    android:versionName="1.0"
    android:debuggable="true">

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

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

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

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

</manifest>
c0dezer019
  • 188
  • 2
  • 12
  • 2
    There seems to be nothing wrong with your configuration so far. What errors are you getting, exactly? Try to isolate the relevant parts (directly after a crash) from logcat. Currently there is simply not enough information to tell what goes wrong. – dhke Oct 27 '15 at 16:27
  • @dhke I am using AIDE which is an Android IDE app. I may have to wait till I get home as right now I have no access to a computer. I get something like 'Unknown Member '' of 'com.ghostdevelopment.ueni2.MyApplication.R.id'. – c0dezer019 Oct 27 '15 at 16:33
  • You need to be specific about what error(s) you are getting. Are they compile or runtime errors. – William Oct 28 '15 at 21:42
  • @William that's just the thing I'm not receiving any errors. It just doesn't do anything. – c0dezer019 Oct 28 '15 at 21:44
  • At runtime? At compile time? What does you logcat say? – William Oct 28 '15 at 21:50
  • @William I am doing this from my mobile phone, free and clear from my PC at the moment (150 miles to be exaxt). Won't be at computer till the weekend. Is this something I'll need a PC to solve? – c0dezer019 Oct 28 '15 at 21:55
  • I would expect so, unless you have a development environment on your phone. – William Oct 30 '15 at 01:47
  • @William I'm an idiot. AIDE has logcat..facepalm. the errors are runtime and numerous, I will post tomorrow when I'm on my pc. – c0dezer019 Oct 30 '15 at 02:01
  • @William These are the errors I've been getting. ![Logcat](http://imgur.com/YgIKwGt) – c0dezer019 Oct 30 '15 at 16:06

1 Answers1

2

According to your logcat it appears that your app has not included the ACRA library. You need to configure your build so that ACRA is included in your APK.

William
  • 20,150
  • 8
  • 49
  • 91
  • 1
    Some times ago i try to do that. I include un my gradle the acra library and apk compile good without errorsz something like question has , but i did not receive any mail on app crash too. What do you mean with acra should be include un apk, inckuding in gradle file and configuring aplicación to init acra is not enought? It left another step? – Max Pinto Oct 30 '15 at 23:21
  • You have somehow managed to configure your build such that the ACRA classes are not being included in your APK. The most likely possibility is that you are using Proguard and have not included the necessary ACRA Proguard exclusions, so you are obfuscating or omitting the ACRA classes that way. Or you have just not configured your build properly in some other fashion. – William Oct 31 '15 at 10:01
  • Had the wrong .jar file as it turns out! I had placed the .jar for the source files instead of the build .jar. – c0dezer019 Oct 31 '15 at 19:08