由网友(明天的阳光美吗)分享简介:所以,最新的墙上我已经打在试图写用我的程序的SD卡。我越来越:So the latest wall I've hit is in trying to write to the sdcard with my program. I'm getting:[2011-05-28 10:00:16 - LatinDicti...
所以,最新的墙上我已经打在试图写用我的程序的SD卡。我越来越:
So the latest wall I've hit is in trying to write to the sdcard with my program. I'm getting:
[2011-05-28 10:00:16 - LatinDictionary] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.joelman.latindictionary/.LatinDictionary } from null (pid=-1, uid=-1) requires android.permission.WRITE_EXTERNAL_STORAGE
你可以从我下面的清单看,我已经添加了权限(我也试图将它添加到每一项活动中,都无济于事)。我在想什么?
As you can see from my manifest below, I've added the permission (I also tried adding it to each of the activities, to no avail). What am I missing?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joelman.latindictionary"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:permission="android.permission.WRITE_EXTERNAL_STORAGE">
<activity android:name=".LatinDictionary">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
<intent-filter><action android:name="android.intent.action.SEARCH"></action>
</intent-filter>
</activity>
<provider android:name="DictionaryProvider" android:authorities="com.joelman.latindictionary.DictionaryProvider"></provider>
</application>
</manifest>
TIA, 乔尔
TIA, Joel
推荐答案
这应该是这样的:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joelman.latindictionary"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:permission="android.permission.WRITE_EXTERNAL_STORAGE">
<activity android:name=".LatinDictionary">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
<intent-filter><action android:name="android.intent.action.SEARCH"></action>
</intent-filter>
</activity>
<provider android:name="DictionaryProvider" android:authorities="com.joelman.latindictionary.DictionaryProvider"></provider>
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
</manifest>
相关推荐
最新文章