我正在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'
}
尝试将您的升级buildToolsVersion
到“ 23.0.1”,如下所示:
compileSdkVersion 23
buildToolsVersion "23.0.1"
如果您没有安装此版本的buildTools,请使用SDKManager下载它作为提示。
只是尝试过而没有用,我的意思是构建仍然失败了。
是的 这可能与我的Java有关吗?
请尝试清理和重建,我认为某些依赖罐已经过时了。
我尝试了23.0.1、23.0.2,项目结构(intellij)中的所有内容都指向1.7,。/ gradlew --version和javac都指向1.7,JAVA_HOME设置为指向1.7,但仍然没有运气-我总是以某种方式设法使它起作用,但我总是忘记如何做。这是神奇的:(
我应该在哪里进行这些更改?我拉了一个React Native应用并在构建时遇到了这个错误。