2017-04-19 57 views
0

Error:Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details how to fix this error please ans me編譯'com.firebaseui:firebase-ui:0.4.3如何修復錯誤。我每次都遇到錯誤與任何火力UI依賴

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' ?> 

如何解決這個錯誤請幫我

+0

添加您的gradle錯誤的詳細信息。 –

+0

錯誤:執行任務':app:compileDebugJavaWithJavac'失敗。編譯失敗;查看編譯器錯誤輸出;;;這個錯誤我在消息查看.. –

+0

請參閱下面的答案。 –

回答

1

您正在使用:

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

由於描述in the documentation:

Each version of FirebaseUI has dependency on a fixed version of these libraries, defined as the variable firebase_version in common/constants.gradle . If you are using any dependencies in your app of the form compile 'com.google.firebase:firebase-*:x.y.z' or compile 'com.google.android.gms:play-services-*:x.y.z'you need to make sure that you use the same version that your chosen version of FirebaseUI requires.

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