
我写了一个简单的Hello World应用程序来调试我遇到的一些权限问题.
问题是我的应用无法获得使用任何内容的权限.是的,我正在使用
<uses-permission androID:name="androID.permission.ACCESS_FINE_LOCATION"/>是的,我把那个标签放在< manifest>下面在AndroIDManifest.xml中
如果我删除所有< uses-permission>清单中的标签,然后转到设置>应用> TestApp,它说没有请求权限
如果我重新放入标签,则说没有授予权限
如果我在实际设备上进行调试,它会说权限存在,所以看起来这个问题只发生在模拟器上!但是,当我使用相同的模拟器从developer.androID.com运行androID-play-location / LocationUpdates项目时它也有效,所以可能我的项目设置有问题.
有任何想法吗?
> IDE:AndroID Studio
>虚拟设备:Nexus_5_API_23
> *** 作系统:客户端Ubuntu 14.04在主机OS X Yosemite上运行(VMWare Fusion)
解决方法:
If I put the Tags back in, it says No permissions granted
这是因为您在AndroID 6.0上进行测试,而您的targetSdkVersion设置为23.
If I deBUG on an actual device, it says the permissions are there so it looks like this problem is only occurring on the emulator!
不,它仅在AndroID 6.0上发生.
However, it also works when I run the androID-play-location/LocationUpdates project from developer.androID.com using the same emulator so maybe there’s something wrong with my project setup.
该项目可能有一个低于23的targetSdkVersion.
ACCESS_FINE_LOCATION由the Android 6.0 runtime permission system管理.要么更新您的应用程序以使用该系统,要么将targetSdkVersion降至23以下,直到您准备好这样做.
总结以上是内存溢出为你收集整理的Android模拟器上未授予权限全部内容,希望文章能够帮你解决Android模拟器上未授予权限所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)