Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
修复Android studio中的版本冲突_Android - Fatal编程技术网

修复Android studio中的版本冲突

修复Android studio中的版本冲突,android,Android,所以我将我的应用程序连接到Firebase,他们给了我这个: 请通过更新google services插件的版本(有关最新版本的信息,请访问)或将com.google.android.gms的版本更新为16.0.0来修复版本冲突 虽然这听起来很奇怪,但我不完全理解他们的意思。这是我的毕业代码: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation

所以我将我的应用程序连接到Firebase,他们给了我这个:

请通过更新google services插件的版本(有关最新版本的信息,请访问)或将com.google.android.gms的版本更新为16.0.0来修复版本冲突

虽然这听起来很奇怪,但我不完全理解他们的意思。这是我的毕业代码:

dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        compile 'com.google.firebase:firebase-core:16.0.0'
        implementation 'com.google.firebase:firebase-database:16.0.1'
        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'
}

apply plugin: 'com.google.gms.google-services'
有人能给我解释一下错误信息的含义和我能做什么吗?如何更新这个google.android.gms


非常感谢您的帮助:-)

如果firebasecore是16.0.0,您应该使用相同的版本 所有其他firebase应与16.0.0相同

请更正此..在你的应用程序中gradle:

   { compile 'com.google.firebase:firebase-core:16.0.0'
    implementation 'com.google.firebase:firebase-database:16.0.1'}

use it like this....

    implementation  'com.google.firebase:firebase-core:16.0.0'
    implementation 'com.google.firebase:firebase-database:16.0.0'

Let me know it this work for u...

你应该使用相同的版本,否则它将与其他相同的支持库冲突

这是整个项目中唯一的de build.gradle文件吗?做一个项目搜索,应该有另一个。在您的根文件夹中。这是gradle文件的“我的依赖项”部分。我没有把整件事都发出去,这是不必要的