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'
}
In Android Studio 3.1, you can see the errors details in the Build window.
Open up Build tab. They are somewhat hidden, you have to expand the Java compiler node. You will see the errors there.
But there is a better way to see the errors. You can click on the Toggle View button to get a better view of the error. That way you don't have to expand each node.
The problem is just in naming folder, if your folder to save your project contains special characters then remove them. If the error persists try to save the folder with no space.
Your gradle files might be corrupted. Try running
./gradlew --refresh-dependencies
in the terminal inside android studio.
I faced a similar problem, but I had to set manually the jdk folder on program files, so I recommend to everybody specially the ones that are upgrading to java 8, to point directly in the project settings of the android studio, either using the embed option or choosing the folder
Use these settings and it will work fine.
this works for me