【问题标题】:compile 'com.firebaseui:firebase-ui:0.4.3 how to fix error. i get every time error with any firebase ui dependencies编译 'com.firebaseui:firebase-ui:0.4.3 如何修复错误。我每次都会遇到任何 firebase ui 依赖项的错误
【发布时间】:2017-04-19 09:11:41
【问题描述】:

错误:任务 ':app:compileDebugJavaWithJavac' 执行失败。 编译失败;有关如何修复此错误的详细信息,请参阅编译器错误输出,请回答我

我的build.gradle

apply plugin: 'com.android application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'
    defaultConfig {
        applicationId "com.example.mayur.mahadev"
        minSdkVersion 22
        targetSdkVersion 25
        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/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    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:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.firebase:firebase-client-android:2.5.2'
    compile 'com.firebaseui:firebase-ui:0.4.3'
    compile 'com.google.firebase:firebase-database:10.0.1'
    testCompile 'junit:junit:4.12'
}


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

如何解决这个错误请帮助我

【问题讨论】:

  • 添加您的 gradle 错误的详细信息。
  • 错误:任务 ':app:compileDebugJavaWithJavac' 执行失败。编译失败;查看编译器错误输出;;;我在消息视图中收到此错误..
  • 请看下面的答案。

标签: android android-gradle-plugin build.gradle javac firebaseui


【解决方案1】:

您正在使用:

compile 'com.firebaseui:firebase-ui:0.4.3'
compile 'com.google.firebase:firebase-database:10.0.1'

in the documentation:所述

FirebaseUI 的每个版本都依赖于这些库的固定版本,在 common/constants.gradle 中定义为变量 firebase_version。如果您在应用中使用 compile 'com.google.firebase:firebase-*:x.y.z'compile 'com.google.android.gms:play-services-*:x.y.z' 形式的任何依赖项您需要确保使用与您选择的 FirebaseUI 版本所需的版本相同的版本。

FirebaseUI Version  Firebase/Play Services Version
1.2.0               10.2.0
1.1.1               10.0.0 or 10.0.1
1.0.1               10.0.0 or 10.0.1
1.0.0               9.8.0
0.6.2               9.8.0
0.6.1               9.6.1
0.6.0               9.6.0
0.5.3               9.4.0
0.4.4               9.4.0
0.4.3               9.2.1

【讨论】:

    【解决方案2】:

    如下更改你的 build.gradle(project) 文件:

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

    希望你能找到解决办法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-16
      • 2019-03-02
      • 2019-01-05
      • 1970-01-01
      • 2011-09-19
      • 2018-09-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多