迁移到新的Places SDK客户端会产生错误

时间:2019-03-19 12:27:27

标签: android google-play-services google-places-api

每当我尝试添加更新的Google Place Place依赖关系时,我都会出错并且无法继续进行操作。另外,我已经在其中添加了play-services依赖性。也尝试了与兼容性库,但仍然得到相同。如果有人遇到相同的问题,请帮助我解决此问题。从最近2天开始停留。

ERROR: In project 'app' a resolved Google Play services library 
dependency depends on another at an exact version (e.g. "[11.2.
0]", but isn't being resolved to that version. Behavior exhibited by 
the library will be unknown.

Dependency failing: com.google.firebase:firebase-analytics-impl:11.2.0 
-> com.google.android.gms:play-services-basement@
[11.2.0], but play-services-basement version was 16.2.0.

The following dependencies are project dependencies that are direct or 
have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services- 
games@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
wallet@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
auth@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase-dynamic- 
links@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
messaging@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play- 
services@11.2.0
-- Project 'app' depends onto com.google.android.gms:play-services- 
nearby@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
storage@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
auth-api-phone@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
vision@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play- 
services@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
tagmanager@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
fido@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
fitness@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
plus@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
location@11.2.0
-- Project 'app' depends onto com.google.firebase:firebase- 
analytics@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
tagmanager-api@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
tasks@{strictly 16.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services- 
analytics-impl@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
core@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
auth@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
cast-framework@{strictly 11.2.0}
-- Project 'app' depends onto 
com.google.android.libraries.places:places@{strictly 1.0.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
iid@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
basement@{strictly 16.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
appindexing@{strictly 11.2.0}
-- Project 'app' depends onto 
com.github.ankitdubey021:GPSTracker@{strictly 2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
drive@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
messaging@11.2.0
-- Project 'app' depends onto com.google.android.gms:play-services- 
iid@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
ads@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
gass@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
crash@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase-analytics- 
impl@{strictly 11.2.0}
-- Project 'app' depends onto 
com.google.android.libraries.places:places@1.0.0
-- Project 'app' depends onto com.google.firebase:firebase-database- 
connection@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase-core@11.2.0
-- Project 'app' depends onto com.google.android.gms:play-services- 
analytics@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
location@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
places-placereport@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
identity@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
ads-lite@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
places@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase-storage- 
common@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
gcm@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
base@{strictly 16.1.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
auth-base@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
wearable@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
appinvite@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
instantapps@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
phenotype@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
common@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
vision-common@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
database@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
cast@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
panorama@{strictly 11.2.0}
-- Project 'app' depends onto com.google.firebase:firebase- 
config@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
tagmanager-v4-impl@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
safetynet@{strictly 11.2.0}
-- Project 'app' depends onto com.github.ankitdubey021:GPSTracker@2.0
-- Project 'app' depends onto com.google.android.gms:play-services- 
awareness@{strictly 11.2.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
maps@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services- 
clearcut@{strictly 16.0.0}

For extended debugging info execute Gradle from the command line with 
./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the 
google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding 
"googleServices { disableVersionCheck = false }" to your b
uild.gradle file.

应用程序级别build.gradle:-

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':calendar')
implementation project(path: ':filepicker')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.android.support:design:27.1.1'

implementation 'com.android.support:multidex:1.0.3'
// butter knife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.hedgehog.ratingbar:app:1.1.2'
implementation 'co.lujun:androidtagview:1.1.4'
implementation 'com.sdsmdg.harjot:materialshadows:1.2.5'
implementation 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.google.android.gms:play-services:11.2.0'
implementation 'com.google.android.gms:play-services-location:11.2.0'
implementation 'com.google.android.libraries.places:places:1.0.0'
implementation('com.squareup.retrofit2:retrofit:2.1.0') {
    // exclude Retrofit’s OkHttp dependency module and define your own module import
    exclude module: 'okhttp'
}
implementation 'com.google.code.gson:gson:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.tapadoo.android:alerter:2.0.6'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
implementation 'com.whiteelephant:monthandyearpicker:1.2.0'
implementation 'com.droidninja:filepicker:2.1.5'
implementation 'pub.devrel:easypermissions:1.2.0'

implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.veinhorn.scrollgalleryview:library:1.0.8'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'org.jsoup:jsoup:1.10.3'
implementation 'com.github.ybq:Android-SpinKit:1.1.0'
implementation 'com.github.rahatarmanahmed:circularprogressview:2.5.0'
implementation 'com.google.guava:guava:25.1-android'
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
implementation 'com.github.luongvo:iOS-SwitchView:1.0.2'
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
implementation 'se.emilsjolander:StickyScrollViewItems:1.1.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'bg.devlabs.fullscreenvideoview:library:0.0.9'
implementation 'com.sothree.slidinguppanel:library:3.4.0'

implementation 'com.google.firebase:firebase-core:11.2.0'
implementation 'com.google.firebase:firebase-messaging:11.2.0'

implementation 'com.firebase:firebase-client-android:2.5.1'
implementation 'com.github.tibolte:agendacalendarview:1.0.4'
implementation 'com.github.ravindu1024:android-viewpager-indicator:1.0.1'
implementation 'com.github.orangegangsters:swipy:1.2.3@aar'
implementation 'com.whiteelephant:monthandyearpicker:1.3.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'com.github.didikk:sticky-nestedscrollview:1.0.1'
implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
implementation 'me.zhanghai.android.materialratingbar:library:1.3.1'

implementation 'com.facebook.android:facebook-android-sdk:[4,5)'

implementation 'com.github.ankitdubey021:GPSTracker:2.0'
}
apply plugin: 'com.google.gms.google-services'

项目级别build.gradle:-

buildscript {
ext.kotlin_version = '1.2.71'
ext.kotlin_version = '1.2.30'
configurations.all {
    resolutionStrategy {
        force 'net.sf.proguard:proguard-gradle:5.3.3'
    }
}

repositories {
    google()
    jcenter()
    maven {
        url "https://maven.google.com"
    }
    maven {
        url 'https://maven.fabric.io/public'
    }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.3.2'
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.25.4'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}



allprojects {
repositories {
    google()
    jcenter()
    maven { url 'https://jitpack.io' }
}
}


task clean(type: Delete) {
delete rootProject.buildDir
}

2 个答案:

答案 0 :(得分:0)

  

https://stackoverflow.com/a/55045772/10579969

根据上述指南,您使用新地点API

答案 1 :(得分:0)

如果您具有Places play服务的旧实现,则只需替换gradle。 只需删除这个。     实施“ com.google.android.gms:play-services地点:$ googlePlayServiceVersion”

并添加新的兼容性库。     实施'com.google.android.libraries.places:places-compat:1.1.0'

您不需要任何其他更改,我们只需要从Playservice迁移到静态兼容性库即可。