我检查了其他一些类似的错误,但是他们的解决方案都无法解决我的问题。
由于出现此确切错误,我无法构建项目:
The library com.google.android.gms:play-services-ads-base is being requested by various other libraries at [[17.0.0,17.0.0]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
首先,我进入依赖关系树,看到的所有使用都在使用17.0.0版本,没有人使用15.0.1。 (导致冲突) 但是,如果打开项目依赖项,我的gradle文件和项目列表之间会看到不同的版本。
implementation "com.google.firebase:firebase-core:16.0.4"
implementation 'com.google.firebase:firebase-ads:17.0.0'
implementation "com.google.firebase:firebase-iid:17.0.3"
implementation "com.google.firebase:firebase-common:16.0.3"
implementation "com.google.firebase:firebase-messaging:17.3.3"
implementation "com.google.firebase:firebase-appindexing:16.0.2"
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-storage:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation 'com.google.android.gms:play-services-drive:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation "com.google.android.gms:play-services-gcm:16.0.0"
implementation "com.google.android.gms:play-services-ads:17.0.0"
implementation "com.google.android.gms:play-services-appinvite:16.0.4"
implementation "com.google.android.gms:play-services-tasks:16.0.1"
implementation "com.google.android.gms:play-services-plus:16.0.0"
implementation "com.google.android.gms:play-services-auth:16.0.1"
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation "com.google.android.gms:play-services-vision:16.2.0"
implementation "com.google.android.gms:play-services-cast-framework:16.0.3"
implementation "com.google.android.gms:play-services-basement:16.0.1"
+--- com.google.firebase:firebase-ads:17.0.0
| +--- com.google.android.gms:play-services-ads:17.0.0
| | +--- com.android.support:customtabs:26.1.0
| | | +--- com.android.support:support-compat:26.1.0 -> 27.1.1 (*)
| | | \--- com.android.support:support-annotations:26.1.0 -> 27.1.1
| | +--- com.google.android.gms:play-services-ads-base:[17.0.0] -> 17.0.0
| | +--- com.google.android.gms:play-services-ads-identifier:16.0.0 (*)
| | +--- com.google.android.gms:play-services-ads-lite:[17.0.0] -> 17.0.0
| | | +--- com.google.android.gms:play-services-ads-base:[17.0.0] -> 17.0.0
| | | +--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | | \--- com.google.android.gms:play-services-measurement-sdk-api:16.0.2
| | | +--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | | \--- com.google.android.gms:play-services-measurement-base:16.0.3
| | +--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | \--- com.google.android.gms:play-services-gass:[17.0.0] -> 17.0.0
| | +--- com.google.android.gms:play-services-ads-base:[17.0.0] -> 17.0.0
| | \--- com.google.android.gms:play-services-basement:16.0.1 (*)
| \--- com.google.firebase:firebase-analytics:16.0.4 (*)
我已将所有google依赖项更新到最新版本,但仍然无法正常工作。
如果未在依赖关系树中显示该库,我如何弄清楚哪个库正在使用冲突版本?