在设备上调试时授予 Android 应用程序 android.permission.INTERNET 权限 [英] Granting Android application the android.permission.INTERNET permission while debugging on device

查看:17
本文介绍了在设备上调试时授予 Android 应用程序 android.permission.INTERNET 权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Android 开发很陌生,无法找到答案.我已经在清单文件中指定我需要 android.permission.INTERNET 权限,但是当我尝试在手机上运行该应用程序时,它给了我一个 java.lang.SecurityException: Permission Denial: 启动 Intent 错误.我错过了什么?

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?

推荐答案

问题是我已将 android.permission.INTERNET 放在应用程序属性权限框中,而不是在我的应用程序使用的权限选项卡(使用 Eclipse)中指定许可.清单中的正确行是这样的:

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.

这篇关于在设备上调试时授予 Android 应用程序 android.permission.INTERNET 权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆