【发布时间】:2012-10-14 13:45:41
【问题描述】:
我尝试在我的项目中使用 ACRA,但每当我的应用启动时,我都会在日志中看到以下消息。
E/ACRA (11618): com.example.TestApp should be granted permission android.permission.INTERNET if you want your crash reports to be sent. If you don't want to add this permission to your application you can also enable sending reports by email. If this is your will then provide your email address in @ReportsCrashes(mailTo="your.account@domain.com"
下面是我的AndroidManifest.xml,它有互联网权限,所以不知道这里发生了什么。任何帮助表示赞赏!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.TestApp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:icon="@drawable/ic_launcher"
android:name="TestApplication"
android:label="@string/app_name" >
<activity
android:name="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>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
【问题讨论】:
-
您是否尝试过清理和重建?
-
当您查看 ACRA 源代码以查看他们在哪里记录此内容时,您发现了什么?
-
@CommonsWare 这是一个使用
PackageManager的非常简单的权限检查。我不认为这个问题真的与 ACRA 有关。 -
尝试将
<uses-permission>移动到<application>之前(例如,在<uses-sdk>之后)。打包工具可能对这些元素的去向有些挑剔,而这正是我经常看到的地方。 -
@CommonsWare 我已经尝试过了,因为我在其他地方找到了相同的信息。没有帮助。
标签: android acra android-permissions