com.google.android.gms:play-services-basement 正在被 [[15.0.1,15.0.1]] 上的各种其他库请求,但解析为 16.1.0
library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.1.0
我正在尝试处理图像处理项目,我使用 Firebase 数据库,当我尝试在依赖项中添加播放服务视觉时,它出现了错误,即 'The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.1.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4: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 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
}
要解决此问题,请更改以下代码行:
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
到
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
请确保您的 gradle 文件中有以下代码行作为最后一行:
apply plugin: 'com.google.gms.google-services'
另请确保您在顶级(项目)build.gradle
文件中包含以下 Google 服务插件:
classpath 'com.google.gms:google-services:4.2.0'
我正在尝试处理图像处理项目,我使用 Firebase 数据库,当我尝试在依赖项中添加播放服务视觉时,它出现了错误,即 'The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.1.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4: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 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
}
要解决此问题,请更改以下代码行:
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
到
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
请确保您的 gradle 文件中有以下代码行作为最后一行:
apply plugin: 'com.google.gms.google-services'
另请确保您在顶级(项目)build.gradle
文件中包含以下 Google 服务插件:
classpath 'com.google.gms:google-services:4.2.0'