【发布时间】:2015-10-31 06:51:42
【问题描述】:
我正在尝试将崩溃报告发送到电子邮件,但是当我的应用程序崩溃时没有任何反应。我尝试弄乱配置,但我一直收到错误(主要是未知成员,就是这样)。这是我的课程代码。
@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);
}
}
我的清单:
<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>
【问题讨论】:
-
到目前为止,您的配置似乎没有任何问题。你到底得到了什么错误?尝试从 logcat 中隔离相关部分(直接在崩溃之后)。目前根本没有足够的信息来判断出了什么问题。
-
@dhke 我正在使用 AIDE,它是一个 Android IDE 应用程序。我可能不得不等到我回家,因为现在我无法使用电脑。我得到类似'com.ghostdevelopment.ueni2.MyApplication.R.id'的'未知成员''。
-
您需要具体说明您遇到的错误。它们是编译错误还是运行时错误。
-
@William 这就是我没有收到任何错误的事情。它只是没有做任何事情。
-
在运行时?在编译时?你 logcat 怎么说?