在将Google Play Service升级到9.2.0版本后,在执行gradle同步时我遇到了以下错误。
我该如何解决这个问题?
Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.2.0
我该如何解决这个问题?
Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.2.0
classpath 'com.google.gms:google-services:3.0.0'
google-services.json
文件。 - RohanUpdate your local Google Repository. Run Android SDK manager, find Google Repository and update it to the latest version.
In your project level build.gradle add
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
...
}
In your app level build.gradle add
dependencies {
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-measurement:9.2.0'
//or any google library, which you are interested of
...
}
In your app level build.gradle add to the bottom of the file
apply plugin: 'com.google.gms.google-services'