requires android.permission.INTERNET when using phone to debug
F开发者_开发知识库or some reason, the emulator works fine for the app. However, when I deploy the app directly to the phone I get an error message.
[2011-07-19 22:30:27 - DOL Agency Names] ActivityManager: java.lang.SecurityException:
Permission Denial: starting Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10000000
cmp=my.smh.dolagencynames/.DOLAgencyNamesActivity }
from null (pid=2344, uid=2000) requires android.permission.INTERNET
And, the app shows as installed on the phone but when I click on the app it says the application was not installed.
I have even signed the app and installed it from the sd card. I even tried to install it with adb install.
For some reason, this app will not install on my phone. The phone version is 2.2. I have built the app for both 1.5 and 2.2. Neither works.
You must declare the INTERNET
permission in your manifest if you app is making any network requests (this includes calls that might make network requests for you, like analytics).
This link explains permissions. You'll want to add:
<uses-permission android:name="android.permission.INTERNET" />
Make sure you're using uses-permission
and not permission
. They do different things.
精彩评论