2017-02-18 45 views
0

错误:配置项目':app'时发生问题。Firebase依赖关系中的gradle构建错误

Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find com.google.firebase:firebase-core:10.1.0. Required by: FirstApp:app:unspecified Could not find com.google.firebase:firebase-database:10.1.0. Required by: FirstApp:app:unspecified

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile 'com.google.firebase:firebase-core:10.1.0' 
    compile 'com.google.firebase:firebase-database:10.1.0' 
    androidTestCompile('com.android.support.test.espresso:espres‌​so-core:2.2.2', { 
     exclude group: 'com.android.support', 
     module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.1.1' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 
+0

使用'10.2.0'版本 –

+0

只要阅读火力的有明确提到的依赖文档和排除选项[这里](HTTPS:// firebase.google.com/docs/android/setup),看看[this too](http://stackoverflow.com/questions/31759101/firebase-android-sdk-causing-gradle-error-with-no-error-cause ) – ADM

+0

可以粘贴你的gradle文件。 – Shekhar

回答

0

嗨它与库 的版本。在我的情况下一个问题,我改变了版本 com.google.firebase:火力核心:10.1.0。
com.google.firebase:firebase-database:10.1.0 至 com.google.firebase:firebase-core:10.0.0。
com.google.firebase:火力数据库:10.0.0

+0

检查此链接供参考 http://stackoverflow.com/questions/38090248/could-not-resolve-all-dependencies-for-configuration-appde bugapkcopy –

+0

感谢所有人,通过将版本更改为10.2.0并重新安装存储库使我的构建运行成功 –