2012-11-21 172 views
2

我使用着名的ACRA错误报告工具将崩溃日志发送到我在Google文档中上传的文档。ACRA错误报告失败

我按照所有低于

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

但是我的应用程序没有错误报告发送到文件,其中我已经上传提到的步骤。

我可以看到由ACRA生成的以下错误日志。

2月1日至一日:11:19.995:E/ACRA(6054):ACRA抓住一个RuntimeException 例外com.example.arcasample。建设报告。

下面是我的源代码,我相信它是完美的。

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> 

可发请告诉我,如果我错过任何东西。

在此先感谢。

+0

你缺少塔ACAR活动声明 <活动机器人:名字= “org.acra.CrashReportDialog” 机器人:主题= “@安卓风格/ Theme.Dialog” 机器人:launchMode = “singleInstance” 机器人: excludeFromRecents =“true” android:finishOnTaskLaunch =“true”/> – jnr

回答

0

好吧,我试着删除在Google文档上创建的表单并重新创建它。我不知道我以前做过什么错误吗?

反正重新创建窗体并仔细注意窗体关键解决了我的问题。