2017-11-08 1 views
0

Ich arbeite an einem Projekt mit Firebase, aber nach der Aktualisierung der Versionen erhalte ich einen Fehler für 'import com.firebase.client.Firebase;'.Ich erhalte einen Fehler für 'import com.firebase.client.Firebase;' auf Android

Ich habe das Projekt gereinigt, neu aufgebaut und gelöscht aus dem lokalen und importiert von github, wo ich die Informationen gespeichert habe.

Hier ist meine build.gradle

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

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

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

und hier ist mein build.gradle (Modul: app)

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.2' 
    defaultConfig { 
     applicationId "com.example.android" 
     minSdkVersion 19 
     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' 
     } 
    } 
    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/NOTICE' 
    } 
} 

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.+' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.android.support:design:26.0.0-alpha1' 
    compile 'com.android.support:support-v4:26.0.0-alpha1' 
    compile 'com.android.support:recyclerview-v7:26.0.0-alpha1' 
    compile 'com.android.support:cardview-v7:26.0.0-alpha1' 

    compile 'com.google.android.gms:play-services-maps:11.0.4' 
    compile 'com.google.maps.android:android-maps-utils:0.4.+' 
    compile 'com.google.firebase:firebase-core:11.0.4' 
    compile 'com.google.firebase:firebase-database:11.0.4' 
    compile 'com.google.firebase:firebase-auth:11.0.4' 
    compile 'com.google.firebase:firebase-storage:11.0.4' 

    compile 'com.google.code.gson:gson:2.2.4' 
    compile 'com.google.zxing:core:3.2.1' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'com.github.wdullaer:MaterialDateTimePicker:v3.0.0' 
    compile 'com.journeyapps:zxing-android-embedded:[email protected]' 
    testCompile 'junit:junit:4.12' 
} 

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

hier ist ein Fehler, ich

Screenshot Fehler

image haben

Antwort

0

versuchen, diese Zeile in gradle Datei hinzuzufügen.

compile 'com.firebase:firebase-client-android:2.5.0' 
Verwandte Themen