2016-09-21 3 views
1
나는 많은 비슷한 질문이 이미 알고

를 해결하지만, 자신의 모든 솔루션은 내가 가지고있는 Gradle을 파일의 하단에오류 : 'app : processDebugGoogleServices'작업의 실행에 실패했습니다. > 버전 충돌 안드로이드

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

을 추가하는 경우에 대한 설명하십시오. 또는 Google 서비스를 3.0.0으로 업데이트 할 수도 있습니다. 플레이 서비스 : com.google.android.gms에 롤백

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] 
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 9.0.0. 
Information:BUILD FAILED 

:

오류는 9.0.0 작품,하지만 난 완전히 사용할 수 없습니다 해요 중포 기지와의 충돌을 만듭니다. 나는 9.4.0 놀이 서비스를 사용하려고합니다.

은 여기 내 최고 수준의 빌드 graddle 파일입니다

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.0' 
     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() 
    } 
} 

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

여기 내 응용 프로그램 수준의 Gradle을 파일입니다

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion '24.0.2' 
    defaultConfig { 
     applicationId "com.studio08.ronen.Zivug" 
     minSdkVersion 16 
     targetSdkVersion 24 
     multiDexEnabled true 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
//  debug { 
//   debuggable true 
//  } 
    } 
} 

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' 
    }) 
    // third-parties 
    // https://github.com/lopspower/CircularImageView 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.mikhaellopez:circularimageview:3.0.2' 
    // material design and appcompat 
    compile 'com.android.support:appcompat-v7:24.2.1' 
    compile 'com.android.support:design:24.2.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4' 
    compile 'com.android.support:support-v4:24.2.1' 
    compile 'com.android.support:palette-v7:24.2.1' 
    compile 'com.android.support:cardview-v7:24.2.1' 
    // google 
    compile 'com.google.firebase:firebase-core:9.0.0' 
    compile 'com.firebaseui:firebase-ui:0.5.3' 
    compile 'com.google.firebase:firebase-auth:9.4.0' 
    // compile 'com.google.android.gms:play-services-maps:9.4.0' 
    // compile 'com.google.android.gms:play-services:9.4.0' 
    testCompile 'junit:junit:4.12' 
    compile 'com.google.android.gms:play-services:9.4.0' 


} 

// ADD THIS AT THE BOTTOM 
apply plugin: 'com.google.gms.google-services' 

가 대단히 감사합니다.

답변

2

이 시도 : 플러그인을 적용 : 당신이 말할 때 때문에

compile 'com.google.android.gms:play-services:9.4.0' 

제거 'com.google.gms.google-서비스'는 구글이 서비스 종속성을 재생 포함된다. 작동하는지 알려주십시오.

+0

이 작업을 해 주셔서 감사합니다. 문서 어디서나이를 볼 수 없었습니다. – Ronen

2

변경 중포 기지 코어 버전

compile 'com.google.firebase:firebase-core:9.4.0' 
compile 'com.google.firebase:firebase-auth:9.4.0' 

제거

compile 'com.google.android.gms:play-services:9.4.0' 
+0

고맙습니다. firebase가 업데이트되지 않았 음을 나는 잘 알지 못했다. – Ronen

1

클래스 경로를 사용하는 모든 사용자가 'com.google.gms는 : - 서비스 구글 : 3.1.0'

을 그냥 버전을 3.0.0으로 낮추십시오 (이유를 모르겠 음). 그러나 작동

classpath 'com.google.gms:google-services:3.0.0' 
관련 문제