유명한 ACRA 오류보고 도구를 사용하여 Google 문서 도구에 업로드 한 문서에 오류 로그를 보냅니다.ACRA 오류보고가 실패했습니다.
는 내가 모든
https://github.com/ACRA/acra/wiki/BasicSetup
하지만 여전히 내 어플은 업로드 한 문서에 오류 보고서를 보내지 않습니다에서 언급 한 단계 아래 따랐다.
ACRA에서 생성 된 다음 오류 로그를 볼 수 있습니다.
01-01 02 : 11 : 19.995 : E/ACRA (6054)는 : ACRA는 com.example.arcasample하는 예외의 RuntimeException 탔다. 보고서 작성.
다음은 완벽한 소스 코드입니다.
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>
수의 오메 오네 내가 무엇이든 놓치고 있다면 알려주세요.
미리 감사드립니다.
당신이 그쪽으로 ACAR 활동 선언 누락 <활동 안드로이드 : 이름 = "org.acra.CrashReportDialog" 안드로이드 : 테마 = "@ 안드로이드 : 스타일/Theme.Dialog를" 안드로이드 : launchMode = "singleInstance" 안드로이드 : excludeFromRecents = "true" android : finishOnTaskLaunch = "true"/> – jnr