在项目“应用”中,已解决的Google Play服务库依赖关系取决于另一个确切版本(例如“[11.0.4]”)

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

在我的项目中,我使用完整的播放服务依赖,如: -

implementation 'com.google.android.gms:play-services:12.0.1'

但是,我只需要地图和位置依赖项。还需要更新PlaceAutoComplete。为此,我将添加最新的地图,位置和最新的地方依赖项,并删除完整的播放服务库。当我尝试删除播放服务库时,我收到此错误: -

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

Dependency failing: com.google.firebase:firebase-storage:11.0.4 -> 
com.google.firebase:firebase-common@[11.0.4], but fir
ebase-common version was 16.0.3.

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.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.firebase:[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.android.gms:play- 
[email protected]
-- Project 'app' depends onto com.google.firebase:[email protected]
-- Project 'app' depends onto com.google.firebase:firebase-dynamic- 
[email protected]
-- Project 'app' depends onto com.github.ankitdubey021:[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase-database- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase-analytics- 
[email protected]
-- Project 'app' depends onto com.google.android.gms:play-services- 
[email protected]
-- Project 'app' depends onto com.google.firebase:firebase- 
[email protected]
-- Project 'app' depends onto com.google.android.gms:play-services- 
[email protected]
-- Project 'app' depends onto com.google.firebase:[email protected]

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.

这些是我在项目中使用的依赖项: -

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
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.3'
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:12.0.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.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.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.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.9.0'
implementation 'com.veinhorn.scrollgalleryview:library:1.0.8'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'org.jsoup:jsoup:1.11.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:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.4.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.9'
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.41.0'
implementation 'com.github.ankitdubey021:GPSTracker:2.0'
}
apply plugin: 'com.google.gms.google-services'

任何人都可以建议我哪里出错了?

android android-gradle google-play-services
1个回答
-1
投票

我认为问题在于引用不同的版本。

我认为这是你问题的根源:

Dependency failing: com.google.firebase:firebase-storage:11.0.4 -> 
com.google.firebase:firebase-common@[11.0.4], but fir
ebase-common version was 16.0.3.

你在某个地方混合使用firebase和play-services版本:

com.google.android.gms:play-services-maps:16.1.0
com.google.android.gms:play-services-location:16.0.0

com.google.firebase:firebase-core:16.0.8
com.google.firebase:firebase-messaging:17.4.0
com.google.firebase:[email protected]

我还认为你缺少一些需要添加的引用的firebase库。

很多'想',抱歉没有一个正确的答案。

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