0

我想在我的 Android 应用程序安装时获得权限。出于这个原因,我不得不将 targetsdk 从 27 降级到 22。目前,我的build.gradle信息如下:

minSDK 17 
targetSdkVersion 22
compileSdkVersion 27
buildToolsVersion '27.0.0'

在我的应用程序中,这些库已被使用:

compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:support-v4:27.0.1'
compile 'com.android.support:recyclerview-v7:27.0.1'

问题是它没有安装在我的Android 8.1(Pixel手机)上,但在其他手机上,较低的Android版本没有问题。

4

1 回答 1

0

您不能在安装时请求权限,这是过时的,因为它在 5.x 和更低版本的 Android 中使用过,现在您需要在应用程序内请求权限

用户在安装应用程序(Android 5.1.1 及更低版本)或运行应用程序(Android 6.0 及更高版本)时授予权限。

https://developer.android.com/training/permissions/declaring.html

于 2018-01-05T13:20:08.113 回答