Granting Android application the android.permissio

2019-01-27 18:34发布

问题:

I'm very new to Android development and can't find the answer to this. I have specified that I need the android.permission.INTERNET permission in my manifest file but when I try to run the app on my phone it gives me a java.lang.SecurityException: Permission Denial: starting Intent error. What am I missing?

Does my app need to be signed before I can request permissions even during development?

回答1:

The problem was I had put the android.permission.INTERNET in the application attributes permission box instead of specifying in the permissions tab (using Eclipse) that my application uses the permission. The correct line in the manifest is this:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

I'm not sure what the application attributes permission is for.