2016-07-20 11 views
7

otrzymuję następujący błąd podczas dodawania Firebse Remote Config SDK w Gradle plikudało się rozstrzygnąć: kompilacji 'com.google.firebase: Firebase-config: 9.2.1'

compile 'com.google.firebase:firebase-config:9.2.1' 

będzie to pokazuje błąd błędu (25, 13) udało się rozwiązać: com.google.firebase: Firebase-config: 9.2.1 Pokaż w pliku
Show w oknie struktury projektu

Gradle Plik:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.0" 

    defaultConfig { 
     applicationId "com.bazingalabs.firebaseremoteconfig" 
     minSdkVersion 15 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.0.0' 
    compile 'com.google.firebase:firebase-config:9.2.1' 


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

Błąd Obraz enter image description here

+0

Czy dodałeś ścieżkę "com.google.gms: google-services: 3.0.0" do swojego pliku root build.gradle –

+0

czy możesz wysłać dokładnie tam, gdzie dodajesz tę linię? musimy upewnić się, że znajduje się we właściwej lokalizacji. –

+0

Opublikuj strukturę * gradle *. –

Odpowiedz

18

@RiyazAhamed Dziękuję. Rozwiązania: Zaktualizuj "Usługi Google Play" i "Repozytorium Google" z menedżera sdk i zrestartuj studio Android.

0

Dodaj ten poniżej swoich zależnościach:

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

Już dodane nadal pokazuje błąd , Ścieżka dostępu do classpath "com.google.gms: google-services: 3.0.0" została dodana w pliku gradle poziomu projektu –

+0

spróbuj zaktualizować menedżera sdk – Dharmaraj

0

Jest to błąd w tym:

Dodaj do tego pliku Gradle.

packagingOptions { 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/LICENSE-FIREBASE.txt' 
    exclude 'META-INF/notice' 
} 

Użyłem Firebase Messaging

powinno to wyglądać tak

Gradle: App

apply plugin: 'com.google.gms.google-services' //Usually they put this at the bottom (below dependencies {} 
               // but it worked for me at the top also 

android { 
    defaultConfig { ... } 
    buildTypes { .... } 

    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/notice' 
    } 
} 

dependencies { 
     compile fileTree(include: ['*.jar'], dir: 'libs') 
     testCompile 'junit:junit:4.12' 
     compile 'com.google.firebase:firebase-core:9.2.1' 
     compile 'com.firebaseui:firebase-ui:0.3.1' 
     compile 'com.google.firebase:firebase-messaging:9.2.1' 
} 

Gradle: Projekt

dependencies { 
    ... 
    classpath 'com.google.gms:google-services:3.0.0' 

} 
Powiązane problemy