2017-10-02 2 views
0

Impossible de résoudre cette erreur. Vous n'êtes pas sûr de la mise à jour demandée.Problème avec la mise à jour de la version de com.google.android.gms vers 10.2.6

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

Ceci est mon build.gradle (app): appliquer plugin: 'com.android.application'

android { 
    compileSdkVersion 26 
    buildToolsVersion "26.0.1" 
    defaultConfig { 
     applicationId "com.example.kenyon.fakeinsta" 
     minSdkVersion 15 
     targetSdkVersion 26 
     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:+' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 

    //design library coordination layout and toolbar 
    compile 'com.android.support:design:26.+' 

    //bottom navigation view ex library 
    compile 'com.github.ittianyu:BottomNavigationViewEx:1.2.1' 

    //circle imageview 
    compile 'de.hdodenhof:circleimageview:2.1.0' 

    //universal image loader 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' 

    //firebase authentication 
    compile 'com.google.firebase:firebase-auth:10.2.6' 

    //firebase database 
    compile 'com.google.firebase:firebase-database:10.0.1' 


} 

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

ceci est mon build.gradle (projet):

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

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

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

Répondre

0

Veuillez utiliser la même version pour l'authentification firebase et la base de données.

0

Vos fichiers Gradle devraient être comme ça

1) build.gradle (projet):

buildscript { 
    repositories { 
    jcenter() 
    } 
    dependencies { 
    classpath 'com.android.tools.build:gradle:2.3.3' 

    // 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() 
    maven { 
     url "https://jitpack.io" 
    } 

    } 
} 

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

2) build.gradle (app):

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion "26.0.1" 
    defaultConfig { 
    applicationId "com.example.kenyon.fakeinsta" 
    minSdkVersion 15 
    targetSdkVersion 26 
    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' 
    }) 
    //design library coordination layout and toolbar 
    compile 'com.android.support:design:26.+' 

    //bottom navigation view ex library 
    compile 'com.github.ittianyu:BottomNavigationViewEx:1.2.1' 

    //circle imageview 
    compile 'de.hdodenhof:circleimageview:2.1.0' 

    //universal image loader 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' 


    compile 'com.android.support:appcompat-v7:26.0.0-alpha1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.firebase:firebase-auth:10.0.1' 
    compile 'com.google.firebase:firebase-database:10.0.1' 
} 



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

Remarque :

Si vous rencontrez le même problème, utilisez à nouveau firebase assista Ce que vous pouvez trouver sous l'onglet outils dans android studio, il ajoute automatiquement toutes les dépendances nécessaires.

0
apply plugin: 'com.android.application' 

android { 
compileSdkVersion 26 
buildToolsVersion "26.0.1" 
defaultConfig { 
    applicationId "com.example.kenyon.fakeinsta" 
    minSdkVersion 15 
    targetSdkVersion 26 
    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:26.1.0' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
testCompile 'junit:junit:4.12' 

//design library coordination layout and toolbar 
compile 'com.android.support:design:26.1.0' 

//bottom navigation view ex library 
compile 'com.github.ittianyu:BottomNavigationViewEx:1.2.1' 

//circle imageview 
compile 'de.hdodenhof:circleimageview:2.1.0' 

//universal image loader 
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' 

//firebase authentication 
compile 'com.google.firebase:firebase-auth:11.4.0' 

//firebase database 
compile 'com.google.firebase:firebase-database:11.4.0' 


} 

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

fichier Votre niveau d'application build.gradle doit ressembler exactement à ce