0

Also habe ich die Firebase-Quickstarter heruntergeladen und ich versuche zu lernen, Android-Anwendungen mit Android Studio und Firebase zu bauen, aber ich kann nicht diese App kompilieren. Jedes Mal, wenn ich versuche, es betreibe ich den Fehler ...Ausführung fehlgeschlagen für Task ': app: processMinSdkIcsDebugGoogleServices

Error:Execution failed for task ':app:processMinSdkIcsDebugGoogleServices'. 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 11.2.0.

In meinem build.gradle es die com.google.android.gms hat: Play-Dienste-Auth: 11.2.0 und im Haupt build.gradle datei hat com.google.gms: google-services: 3.1.0, beide sind die richtige Version, die es verlangt, also macht es keinen Sinn für mich, warum es mir sagt, dass es das ist, was es braucht Das ist es. Hier ist meine build.gradle Datei für Modul: app

apply plugin: 'com.android.application' 
check.dependsOn 'assembleMinSdkJellybeanDebugAndroidTest', 'assembleMinSdkIcsDebugAndroidTest' 

android { 
    compileSdkVersion 26 
    buildToolsVersion "25.0.3" 
    flavorDimensions "minSdkVersion" 

    defaultConfig { 
     applicationId "com.google.firebase.quickstart.auth" 
     minSdkVersion 14 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' 
    } 

    buildTypes { 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    lintOptions { 
     abortOnError false 
    } 

    productFlavors { 

     // Build variant with minSdk 16 to include Facebook and FirebaseUI libraries. 
     minSdkJellybean { 
      dimension "minSdkVersion" 
      minSdkVersion 16 
     } 

     // Build variant with minSdk 14, excludes Facebook and FirebaseUI libraries. 
     minSdkIcs { 
      dimension "minSdkVersion" 
      minSdkVersion 14 
     } 

    } 
} 

configurations.all { 
    resolutionStrategy.force 'com.android.support:support-annotations:26.0.0' 
} 

dependencies { 

    // Firebase Authentication 

    // Google Sign In SDK (only required for Google Sign In) 

    // Firebase UI 
    // Used in FirebaseUIActivity. The FirebaseUI-Android library has a minSdk level of 16 
    // so this library is only included in the minSdkJellybean variant. 

    // Facebook Android SDK (only required for Facebook Login) 
    // Used in FacebookLoginActivity. This is only compiled into the minSdkJellybean variant of this 
    // app. You can build a 'minSdkGingerbread' variant to test on devices with 9 <= SDK <= 15. 

    // Twitter Android SDK (only required for Twitter Login) 
    compile('com.twitter.sdk.android:twitter-core:[email protected]') { 
     transitive = true 
    } 
    compile('com.twitter.sdk.android:twitter:[email protected]') { 
     transitive = true 
    } 

    compile 'com.android.support:appcompat-v7:26.0.0' 
    compile 'com.android.support:animated-vector-drawable:26.0.0' 
    compile 'com.android.support:cardview-v7:26.0.0' 
    compile 'com.android.support:design:26.0.0' 
    compile 'com.google.firebase:firebase-auth:11.2.0' 
    compile 'com.google.android.gms:play-services-auth:11.2.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.firebase:firebase-storage:10.0.1' 
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 
    androidTestCompile 'com.android.support.test:runner:0.5' 
    minSdkJellybeanCompile 'com.firebaseui:firebase-ui-auth:1.2.0' 
    minSdkJellybeanCompile 'com.facebook.android:facebook-android-sdk:4.9.0' 
    minSdkJellybeanCompile 'com.android.support:customtabs:26.0.0' 
} 

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

Und hier ist die build.gradle Datei für Projekt: Auth

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

allprojects { 
    repositories { 
     jcenter() 
     mavenLocal() 
     maven { url 'https://maven.google.com' } 
     maven { url 'https://maven.fabric.io/public' } 
    } 
} 

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

Ich verstehe nicht, beide der Dinge, die es es sagt Bedürfnisse sind die Version, die es braucht, aber es beschwert sich immer noch und wird nicht kompilieren. Bitte helfen Sie mir, ich fühle mich ziemlich schlecht, dass ich nicht einmal einen vorgefertigten Schnellstarter kompilieren kann, der von Google erstellt wurde. Vielen Dank.

Antwort

1

Sie verwenden die Firebase-Plugin-Version 10.0.1, die sich von der google-services-Version 11.2.0 unterscheidet. Sie sollten Ihre Firebase-Plugin aktualisieren oder die andere google-sdk versions from 11.2.0 to 10.0.1

ändern alle Sie die Abhängigkeiten diese ändern können:

compile 'com.android.support:appcompat-v7:26.0.0' 
compile 'com.android.support:animated-vector-drawable:26.0.0' 
compile 'com.android.support:cardview-v7:26.0.0' 
compile 'com.android.support:design:26.0.0' 
compile 'com.google.firebase:firebase-auth:10.0.1' 
compile 'com.google.android.gms:play-services-auth:10.0.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.google.firebase:firebase-storage:10.0.1' 
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 
androidTestCompile 'com.android.support.test:runner:0.5' 
minSdkJellybeanCompile 'com.firebaseui:firebase-ui-auth:1.2.0' 
minSdkJellybeanCompile 'com.facebook.android:facebook-android-sdk:4.9.0' 
minSdkJellybeanCompile 'com.android.support:customtabs:26.0.0' 

oder dieses:

compile 'com.android.support:appcompat-v7:26.0.0' 
compile 'com.android.support:animated-vector-drawable:26.0.0' 
compile 'com.android.support:cardview-v7:26.0.0' 
compile 'com.android.support:design:26.0.0' 
compile 'com.google.firebase:firebase-auth:11.2.0' 
compile 'com.google.android.gms:play-services-auth:11.2.0' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.google.firebase:firebase-storage:11.2.0' 
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 
androidTestCompile 'com.android.support.test:runner:0.5' 
minSdkJellybeanCompile 'com.firebaseui:firebase-ui-auth:1.2.0' 
minSdkJellybeanCompile 'com.facebook.android:facebook-android-sdk:4.9.0' 
minSdkJellybeanCompile 'com.android.support:customtabs:26.0.0' 
+0

Danke viel so, dass ich nicht sehen das eine da unten lagern. Ehrlich gesagt, habe ich nicht einmal daran gedacht, danach zu suchen. Es sagte, dass ich die com.google.android.gms auf 11.2.0 aktualisieren musste, ich habe keine Ahnung, wie es dir gelungen ist zu erkennen, dass es dafür war. Ich danke dir sehr. –

+0

Es ist eine Freude, Ihnen zu helfen –

Verwandte Themen