温馨提示:本文翻译自stackoverflow.com,查看原文请点击:java - Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio
android android-studio gradle java

java - Android Studio中的任务:app:compileDebugJavaWithJavac执行失败

发布于 2020-03-27 15:38:05

我正在Android Studio中开发一个Android应用程序。不太确定出了什么问题。我几天前已经成功建立了。任何帮助都会很棒。

这是错误:

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.

这是我的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'
}

查看更多

查看更多

提问者
MrTimotheos
被浏览
65
40.7k 2018-12-03 17:14

尝试将您的升级buildToolsVersion到“ 23.0.1”,如下所示:

compileSdkVersion 23
buildToolsVersion "23.0.1"

如果您没有安装此版本的buildTools,请使用SDKManager下载它作为提示。