所有gms库必须使用与地点和地图完全相同的版本

问题描述 投票:0回答:1

我正在使用play-service-maps-8.1.0版本为我的Android谷歌地图应用程序。然后我尝试添加新的谷歌地方服务1.0.0。现在它给了我所有gms库必须完全相同的版本错误。我无法在谷歌的新服务中找到任何地图服务。

implementation 'com.google.android.gms:play-services-maps:8.1.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.1'

他们都没有合作

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

我如何在同一个应用程序中使用地点和地图服务?

我所有的gradle依赖项。

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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 'com.squareup.okhttp3:okhttp:3.9.1'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.android.support:design:26.1.0'

    implementation 'com.google.android.gms:play-services-maps:8.1.0'
    implementation 'com.google.android.libraries.places:places:1.0.0'
}
android google-maps google-places
1个回答
0
投票

看看places:1.0.0:它自己拉入play-services-maps:16.0.0 -

places:1.1.0play-services-maps:16.1.0做同样的事情。


你需要将它添加到根项目qazxsw poi qazxsw poi:

buildscript

这些将是模块的Java dependencies

classpath "com.google.gms:google-services:4.2.0"

对于没有任何Firebase依赖项或Play服务插件的地方,你仍然需要添加至少添加这两个dependencies资源(该项目需要在dependencies { implementation "com.android.support:design:28.0.0" implementation "com.android.support:support-v4:28.0.0" implementation "com.android.support:appcompat-v7:28.0.0" implementation "com.android.support.constraint:constraint-layout:1.1.3" implementation ("com.google.android.libraries.places:places:1.1.0") { exclude group: "com.android.support" } implementation "com.squareup.okhttp3:okhttp:3.12.1" implementation "com.google.code.gson:gson:2.8.5" 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" } apply plugin: "com.google.gms.google-services" 上设置,以获得所需的string,其中包含值被替换):

Firebase

看到google_services.json

© www.soinside.com 2019 - 2024. All rights reserved.