编程语言
首页 > 编程语言> > java-图书馆com.google.android.gms:play-services-basement由[[15.0.1,15.0.1]]的其他各种图书馆要求,但解析为16.1.0

java-图书馆com.google.android.gms:play-services-basement由[[15.0.1,15.0.1]]的其他各种图书馆要求,但解析为16.1.0

作者:互联网

我尝试使用图像处理项目,我使用Firebase数据库,当我尝试根据依赖关系添加play-services-vision时,出现错误ERROR,即“库com.google.android.gms:play-services-其他各种库都在[[15.0.1,15.0.1]]请求地下室,但解析为16.1.0.禁用插件,并使用./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'

另请确保您在顶级(Project)build.gradle文件中具有以下Google Services插件:

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

标签:firebase,google-play-services,ocr,java,android
来源: https://codeday.me/bug/20191108/2006850.html