【发布时间】:2019-07-16 13:56:12
【问题描述】:
我已经完成了 Google place api 到
的迁移implementation 'com.google.android.libraries.places:places:1.1.0'
我正在使用方法。
fetchPlace()
findAutocompletePredictions()
但不是findCurrentPlace()
而且我也没有在清单或其他任何地方授予ACCESS_FINE_LOCATION 的权限。
但是当我尝试在 Play 商店中更新应用程序时。它给了我警告信息。
添加了新权限
警告:
拥有版本代码为 17 的 APK 的用户可能需要接受 android.permission.ACCESS_FINE_LOCATION 权限,这可能会导致他们无法升级到此版本的应用。
为什么它会向用户请求权限,我没有添加任何会向用户请求ACCESS_FINE_LOCATION 权限的功能。
如果我做错或理解错了,请指导我。
这是在清单中添加的权限
<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"/>
build.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')
}
【问题讨论】:
-
您确定没有在应用中的任何位置添加 findCurrentPlace() 并且您已完全迁移到新的 Places SDK?您是否使用任何其他可以自动请求此权限的库?请发布您的清单和 build.gradle。
-
是的,我没有在任何地方添加 findCurrentPlace()。如果我使用旧版本的 Place Api 上传 APK,它不会给我任何警告,而且我也没有任何要求位置许可的功能。
-
我还添加了在menifest和gradle中使用的权限。
-
我明白了。你的设备是什么版本的?
-
我有 Marsh-mellow、Nogut 和 Orio 设备。
标签: android kotlin google-play-services google-places-api