Granting Android application the android.permission.INTERNET permission while debugging on device

℡╲_俬逩灬. 提交于 2019-12-18 07:41:14

问题


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.



来源:https://stackoverflow.com/questions/5279076/granting-android-application-the-android-permission-internet-permission-while-de

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!