使用firebase显示依赖性错误

时间:2017-01-08 09:22:56

标签: android

我正在尝试使用firebase实时database.project成功运行了一段时间但现在显示此错误...

错误:FAILURE:构建因异常而失败。

my build gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.3"
    defaultConfig {
        applicationId "com.example.ashik.project"
        minSdkVersion 17
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    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(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:multidex:1.0.1'
    compile "com.squareup.picasso:picasso:2.4.0"

    compile 'com.google.firebase:firebase-core:9.0.2'
    compile 'com.google.firebase:firebase-database:9.0.2'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support:support-v4:24.0.0'
    compile 'com.android.support:design:24.0.0'
    compile 'com.firebase:firebase-client-android:2.5.2+'
    compile 'com.firebaseui:firebase-ui:0.3.1'
    compile 'com.github.dakatso:livebutton:1.0.0'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.balysv:material-ripple:1.0.2'
    compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services:9.0.2'
    compile 'com.google.android.gms:play-services-ads:9.0.2'
    compile 'com.google.android.gms:play-services-auth:9.0.2'
    compile 'com.google.android.gms:play-services-gcm:9.0.2'
    compile 'org.jsoup:jsoup:1.10.1'
    compile 'com.facebook.stetho:stetho-okhttp:1.4.1'
    androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

https://firebase.google.com/docs/android/setup

为Firebase提供的文档中

开发人员提到了您所面临的同一问题。

“编译”com.google.firebase:firebase-core:10.0.1'

//收到“无法找到”错误?确保你有 // Android SDK管理器中的最新Google Repository“

因此,请尝试更新SDK工具,这应该得到解决。