I am developing an Android App in Android Studio. Not quite sure what went wrong. I was successfully building a few days ago. Any help would be great.
Here is the error:
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
multiDexEnabled true
applicationId "com.tubbs.citychurchob"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.parse.bolts:bolts-android:1+'
compile 'com.android.support:recyclerview-v7:23.1.0'
}
I encountered the same error. JAVA_HOME pointing to the correct version of JDK. All support libraries and build tools updated. Was still facing the same issue.
I am using Android annotations in my project. I added a new View..and there was already an existing view with the same name in the Java file. When I run the project, instead of indicating the view already exists, I was receiving the above error.
Check your java files errors if other solutions does not work.
1st step:
2nd step:
I try both of ans , But nothing work . I thing here is the solution.
From your project-
go to Gradle Scripts >> build.gradle (Module:app) then remove below code (if exist)
.............................................
.............................................
remove it and then clean the project then Run. no java home need to to set, no need to change version
in build file change compile files('AF-Android-SDK.jar') to compile files('libs/AF-Android-SDK.jar') it will work