[英]Could not resolve com.google.gms:google-services:3.0.0
I read many posts on this topic, but no one helped me.我阅读了很多关于这个主题的帖子,但没有人帮助我。 I'm using Android Studio and following this guide
我正在使用 Android Studio 并遵循本指南
This is the project gradle:这是项目gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
this is the app gradle:这是应用程序gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.xyv.appname"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-core:10.0.1'
}
apply plugin: 'com.google.gms.google-services'
Here you can see where I added google-services.json inside my app:在这里您可以看到我在应用程序中添加 google-services.json 的位置:
These are my SDK tools:这些是我的 SDK 工具:
Does anybody understand what's my error?有人明白我的错误是什么吗?
Thank you in advance先感谢您
You may need to add您可能需要添加
compile 'com.google.android.gms:play-services:9.6.1'
in your app build.gradle also.在您的应用程序 build.gradle 中。 ref: Upgrade to Google Play Services:9.0.0 Error Failed to resolve: com.google.android.gms:play-services-measurement:9.0.0
参考: 升级到 Google Play 服务:9.0.0 错误无法解决:com.google.android.gms:play-services-measurement:9.0.0
If you recently bumped the version to 3.0.0 you should doublecheck that you have installed the correct version on your machine in the Android SDK manager.如果您最近将版本提高到 3.0.0,您应该在 Android SDK 管理器中仔细检查您的机器上是否安装了正确的版本。
我通过将 android studio 更新到 2.3 beta 2 解决了我的问题我只是更新了一个 android studio,一切都在破坏
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.