Android App在安装时不要求权限 [英] Android App not asking for permissions when installing

查看:462
本文介绍了Android App在安装时不要求权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在大学的IT部门工作,我们使用的应用程序可以为eduroam WiFi安装正确的设置(也许您已经听说过).

I work in the IT department of my university and we work on an app that installs the correct setup for the eduroam WiFi (maybe you have heard of it).

但是,我在运行Android 6.0的LG G4上运行它时遇到问题.安装已编译的* .apk时,尽管已在AndroidManifest.xml中设置了权限,但它不会要求任何权限.它适用于所有以前的Android版本.

However I have a problem running it on my own LG G4 with Android 6.0. When installing the compiled *.apk it doesn't ask for any permissions although they are set in the AndroidManifest.xml. It was working on all previous Android versions.

现在是否必须在运行时要求许可?

Is it mandatory now to ask for permissions at run time?

推荐答案

如果目标SDK版本为23,则需要在运行时请求危险"权限.

If your target SDK version is 23 then you need to ask for "dangerous" permissions at run time.

如果是这种情况,那么您应该可以看到,如果转到Settings > Apps > "Your app" > Permissions,则没有授予任何权限.

If this is the case then you should be able to see that no permissions have been granted if you go to Settings > Apps > "Your app" > Permissions.

如果您不想实施新系统,则可以将目标sdk版本降低到22,以获取旧的权限系统.不过,您仍然可以使用sdk 23版进行编译.

If you don't want to do implement the new system yet then you can reduce your target sdk version to 22 to get the old permission system. You can still compile with sdk version 23 though.

有关更多信息,请参见文档.

See the documentation for more information.

这篇关于Android App在安装时不要求权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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