LoginSignup
18
11

More than 5 years have passed since last update.

AndroidでGoogle Play 開発者サービス 8.4.0を導入したらversion conflictが起きた

Last updated at Posted at 2016-04-18

はじめに

Android Studio 2.0にて、Google Analyticsを使うためにplay-services-analyticsを入れようとしたら、Gradle Syncでエラーが発生したので、備忘録として残しておきます。

起きたエラー

プラグインとのバージョンの競合がどうのこうの、という内容。

Error:Execution failed for task ':app:processDebugGoogleServices'. > Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.

解決方法

apply plugin: 'com.google.gms.google-services'をbuild.gradleの最後に移したら無事syncできました。

apply plugin: 'com.android.application'
...

dependencies {
    ...
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:support-v4:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
}

apply plugin: 'com.google.gms.google-services'

dependenciesの後に書かないといけなかったのかな……。

参考

18
11
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
11