gpt4 book ai didi

android - IntelliJ中的任务 ':app:compileDebugJavaWithJavac'执行失败

转载 作者:行者123 更新时间:2023-12-03 05:37:25 26 4
gpt4 key购买 nike

我已经在IntelliJ中打开了一个AndroidStudio项目。将来我想与IntelliJ合作,所以我想切换。

但是我得到了
任务':app:compileDebugJavaWithJavac'的执行失败
构建时出现错误,我不知道解决方案是什么。我已经尝试了一些提示,但是现在我需要问一下。

我的gradle:

apply plugin: 'com.android.application'

android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "xxx"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// manifestPlaceholders = [versionCode:"161", versionName:"2.37"]
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
buildConfigField "String", "appID", "\"RELEASE\""
}
full {
buildConfigField "String", "appID", "\"FULL\""
}
debug {
}
}
compileOptions.encoding = 'ISO-8859-1'

}

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:27.0.2'
testCompile 'junit:junit:4.12'
compile 'org.apache.commons:commons-lang3:3.5'
}

在“项目结构”->项目SDK下,设置了Java SDK 1.8。

有人可以帮忙吗?

最佳答案

我认为,您的TargetedSdkVersion小于compileSdkVersion。定位到27,然后尝试同步。

关于android - IntelliJ中的任务 ':app:compileDebugJavaWithJavac'执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55076602/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com