2017-07-27 8 views
1

このGoogleサービスのバージョンエラーを修正しようとしています。以前はGoogleサービスのバージョン10.2.4をGoogle Sign Inに使用していました。私が調査したところでGeofencing APIをアプリケーションに統合したいので、少なくとも最小バージョンの11.0.0が必要です。しかし、私は正確に問題が何であるか把握することができません。私のアプリのbuild.gradleファイルの下Googleサービスのバージョン競合

build.gradle(アプリ)

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.2' 
    defaultConfig { 
     applicationId "com.project.group.projectga" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     resValue "string", "google_maps_key", 
       (project.findProperty("GOOGLE_MAPS_API_KEY") ?: "") 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile('com.mikepenz:materialdrawer:[email protected]') { 
     transitive = true 
    } 

    //Added this for Visual Gallery implementation - Start 
    //Added this for Visual Gallery implementation - End 

    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.google.firebase:firebase-auth:10.2.4' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.android.support:cardview-v7:25.3.1' 
    compile 'com.satsuware.lib:usefulviews:2.3.6' 
    compile 'com.google.firebase:firebase-database:10.2.4' 
    compile 'com.google.firebase:firebase-storage:10.2.4' 
    compile 'com.google.android.gms:play-services-auth:11.0.0' 
    compile 'com.google.android.gms:play-services-maps:11.0.0' 
    compile 'com.google.android.gms:play-services-location:11.0.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:support-v4:25.3.1' 
    compile 'com.jakewharton:butterknife:8.5.1' 
    compile 'com.mikepenz:google-material-typeface:[email protected]' 
    compile 'com.mikepenz:fontawesome-typeface:[email protected]' 
    compile 'com.github.medyo:fancybuttons:1.6' 
    compile 'com.mikhaellopez:circularimageview:3.0.2' 
    compile 'com.github.yesidlazaro:GmailBackground:1.2.0' 
    compile 'com.android.support:support-annotations:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.github.bumptech.glide:glide:3.7.0' 
    testCompile 'junit:junit:4.12' 
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' 
} 

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

そしてまた私のbuild.gradle(プロジェクトを見つけてください、私は

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 10.2.4. 

を取得し、エラーの下に見つけてください。 )ファイル。

build.gradle(プロジェクト)

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.3' 
     classpath 'com.google.gms:google-services:3.1.0' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
     maven { url "https://jitpack.io" } 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

私は、スタックオーバーフローの答えの多くを、その後、彼らは最後に、Googleのサービスのプラグインを追加すると述べました。私は最初からプラグインを追加していますが、これはうまくいかないようです。私はGoogleサービスのバージョンが少なくとも11.0.0であることが必要なGeofencing APIを統合しようとしていますが、それはできません。

答えて

2
同じバージョンおよび11.0.0以上にあなたの firebasecom.google.android.gmsモジュールを移動

compile 'com.google.firebase:firebase-auth:11.0.2' 
compile 'com.google.firebase:firebase-database:11.0.2' 
compile 'com.google.firebase:firebase-storage:11.0.2' 
compile 'com.google.android.gms:play-services-auth:11.0.2' 
compile 'com.google.android.gms:play-services-maps:11.0.2' 
compile 'com.google.android.gms:play-services-location:11.0.2' 
+0

どうもありがとう!それは動作します! –

関連する問題