android - 找不到任何与 com.google.android.gms:play-services-base:[15.0.1,16.0.0) 匹配的版本
问题描述
我正在为我的 android 应用程序使用 firebase,但当我尝试运行该应用程序时突然出现错误。星期六它工作得很好。我不知道这个错误是如何发生的以及如何解决这个问题。请帮我。
我的 build.gradle 中的依赖项
dependencies {
compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
transitive = true;
}
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.google.code.gson:gson:2.8.4'
compile 'com.android.support:multidex:1.0.3'
compile 'com.microsoft.azure:azure-mobile-android:3.1.0'
compile 'com.mixpanel.android:mixpanel-android:4.8.0'
compile 'com.firebase:firebase-client-android:2.4.0'
compile 'com.google.firebase:firebase-core:16.0.0'
compile 'com.google.firebase:firebase-auth:16.0.1'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.github.tibolte:elasticdownload:1.0.+'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.google.android.gms:play-services-vision:15.0.2'
compile 'com.android.support.constraint:constraint-layout:1.1.1'
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'com.wang.avi:library:2.1.3'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.6.0'
androidTestCompile 'com.android.support.test:rules:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
在我的项目级别 build.gradle 中:
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:4.0.0'
}
我得到的错误:
找不到任何与 com.google.android.gms:play-services-base:[15.0.1,16.0.0) 匹配的版本。
解决方案
确保您google()
在项目级 build.gradle 中有存储库,然后是其他存储库:
allprojects {
repositories {
google()
mavenLocal()
jcenter()
}
}
推荐阅读
- mysql - 基于其他列从 1 列返回 2 个值的查询
- docker - 如何让 docker 容器使用主机网络?
- excel - 选择动态范围的单元格
- class - Haxe - 将字符串映射到类
- java - 调用多线程 C++ 代码时 JNI 是否正常工作?
- sql - 如何在 django 中使用 NOT IN sql 查询
- google-maps - 启用地理编码 API 时,Google Maps JavaScript API 抛出“ExpiredKeyMapError”
- javascript - 如何修复这个简单的均值计算器以使其正常工作,以及如何制作它以便它需要尽可能多的数字?
- python - xlsxwriter pandas frame:如果列中有空白单元格,则突出显示行
- electron - Electron:如何删除不需要的模块?