gpt4 book ai didi

android - 迁移到 New Places SDK 客户端请求 Play 商店的 ACCESS_FINE_LOCATION 权限

转载 作者:行者123 更新时间:2023-11-29 02:19:44 31 4
gpt4 key购买 nike

我已将 Google place api 迁移到

implementation 'com.google.android.libraries.places:places:1.1.0'

我正在使用方法。fetchPlace()findAutocompletePredictions()

但不是 findCurrentPlace()而且我也没有在 list 或其他任何地方授予 ACCESS_FINE_LOCATION 权限。

但是当我尝试更新 Play 商店中的应用程序时。它给了我警告信息。

添加了新权限警告:拥有版本代码为 17 的 APK 的用户可能需要接受 android.permission.ACCESS_FINE_LOCATION 权限,这可能会导致他们无法升级到此版本的应用。

为什么它会向用户请求权限,我没有添加任何会向用户请求 ACCESS_FINE_LOCATION 权限的功能。

如果我做错了或理解错了,请指导我。

这是在 list 中添加的权限

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>

构建.gradle

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// implementation "com.android.support:appcompat-v7:$rootProject.supportVersion"
// implementation "com.android.support:support-v4:$rootProject.supportVersion"
implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
implementation "com.google.android.material:material:1.0.0-rc01"

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation project(':cardlib')


implementation 'com.shawnlin:number-picker:2.4.7'
implementation 'de.hdodenhof:circleimageview:3.0.0'

//Google Liabrary
// implementation 'com.google.android.gms:play-services-places:16.0.0'
//New Place integration
implementation 'com.google.android.libraries.places:places:1.1.0'


implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

implementation 'com.android.support:multidex:1.0.3'

//Lottie
implementation 'com.airbnb.android:lottie:3.0.0-beta1'

//Retrofit and Json Parsing
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'

//Chunk Interpretor (For Debug only)
debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'

//Room components
implementation "android.arch.lifecycle:extensions:$rootProject.roomVersion"
implementation "android.arch.persistence.room:runtime:$rootProject.roomVersion"
annotationProcessor "android.arch.lifecycle:compiler:$rootProject.roomVersion"
annotationProcessor "android.arch.persistence.room:compiler:$rootProject.roomVersion"
androidTestImplementation "android.arch.persistence.room:testing:$rootProject.roomVersion"

//FABRIC
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
transitive = true;
}

//Mix Panel
implementation 'com.mixpanel.android:mixpanel-android:5.+'

//Branch IO
implementation 'io.branch.sdk.android:library:2.+'

// Paytm
implementation('com.paytm:pgplussdk:1.3.1') {
transitive = true;
}

implementation 'com.akexorcist:RoundCornerProgressBar:2.0.3'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.github.takusemba:spotlight:1.8.0'
implementation 'com.facebook.android:facebook-android-sdk:4.39.0'
implementation 'com.facebook.android:facebook-core:4.39.0'
implementation 'com.facebook.android:facebook-marketing:4.39.0'
implementation 'com.bitly:bitlysdk:+'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.android:flexbox:1.1.0'
implementation 'com.razorpay:checkout:1.5.5'
implementation 'com.razorpay:razorpay-java:1.3.8'
implementation project(':StackLayoutManager')





}

最佳答案

Places SDK 将其所需的所有权限添加到其 list 中,该 list 会在您构建应用程序时与您的 list 合并。您可以明确删除任何不需要的权限。 This其他答案显示如何:

<manifest ... xmlns:tools="http://schemas.android.com/tools">
...
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
...
</manifest>

关于android - 迁移到 New Places SDK 客户端请求 Play 商店的 ACCESS_FINE_LOCATION 权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57058975/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com