Reputation: 19
Error:Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details how to fix this error please ans me
my 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' ?>
how to fix this error pls help me
Upvotes: 0
Views: 1680
Reputation: 333
Change your build.gradle(project) file as follows:
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}
Hope you will find a solution.
Upvotes: 1
Reputation: 363439
You are using:
compile 'com.firebaseui:firebase-ui:0.4.3'
compile 'com.google.firebase:firebase-database:10.0.1'
As described 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 formcompile 'com.google.firebase:firebase-*:x.y.z'
orcompile '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
Upvotes: 2