2017-03-23 3 views
1

Mac mini에서는 Android Studio 2.3을 사용하고 있습니다.Android Studio, Google Firebase, Google지도

나는 새로운 프로젝트를 열어 시작했다.

MainActivity는

connect project to firebase using Firebase Assistant 
Write to firebase 

모든 것이 여기까지 작동하는 loadingScreen이다.

그런 다음 Google 맵스 활동을 추가하려고하는데 프로젝트가 더 이상 컴파일되지 않습니다.

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

app build.gradle 
    apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.0" 
    defaultConfig { 
     applicationId "us.n_e_ar.akita" 
     minSdkVersion 14 
     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.3.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8' 
    compile 'com.google.firebase:firebase-database:10.0.1' 
    compile 'com.google.android.gms:play-services-maps:10.2.1' 
    testCompile 'junit:junit:4.12' 
} 



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

그리고 여기

// 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.0' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
     classpath 'com.google.gms:google-services:3.0.0' 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

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

미리 감사드립니다 다른 Gradle을 파일을 것입니다 : 내가 표시되는 오전 오류입니다.

답변

2

Firebase와 Google Play 서비스 라이브러리의 버전이 동일해야합니다. 10.0.1에 다음 중 하나를 수행 할 수 있습니다 다운 그레이드 : 10.2.1에

compile 'com.google.firebase:firebase-database:10.0.1' 
compile 'com.google.android.gms:play-services-maps:10.0.1' 

또는 업그레이드 :

compile 'com.android.support.constraint:constraint-layout:1.0.2' 
:

compile 'com.google.firebase:firebase-database:10.2.1' 
compile 'com.google.android.gms:play-services-maps:10.2.1' 

이 업데이트하는 동안, 그것은 최신 제약 레이아웃 lib 디렉토리를 사용하는 것이 아마 현명

+0

감사합니다 !!!!, 오류가 어디에 있는지는 알았지 만 자동 생성 된 것은 정확히 알 수 없습니다. 매력처럼 일했다. 아마 저를 일주일에 구 했어요. –

관련 문제