二、分析 关键报错是:Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11,翻译过来就是:组件使用 Java 17 编译的,但是运行时使用的 Java 11 环境。 三、解决 ...
targetCompatibility JavaVersion.VERSION_17}// 其他配置...} 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 这会将项目的Java版本设置为17。 步骤5:同步Gradle项目 最后,我们需要同步Gradle项目,以使更改生效。在Android Studio的工具栏中,点击“Sync Project with Gradle Files”按钮或使用快捷键Ctrl + Shift + ...
如果您想使用JDK 17或更高版本配置InteliJ with gradle,则需要以下配置。1.文件-〉项目结构-〉项目-〉...
- Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn’t say anything about its target Java version (required compatibility with Java 8) - Doesn’t say anything about its elements (required them packaged as a jar) - ...
Gradle (the build system used for Android apps) has an awkwardly strict dependency on the version of Java it runs on: if you try to run a moderately old Gradle on a new JDK, the build will fail. Moreover it will do so with a totally insc...
apply plugin:'java-library'sourceSets{main{java{srcDir'src/main/java'}resources{srcDir'src/main/resources'}}}java{sourceCompatibility=JavaVersion.VERSION_1_8targetCompatibility=JavaVersion.VERSION_1_8} 3.在buildSrc目录下创建src目录,并在src目录下分别创建main/java和main/resources目录 ...
holderProjects.contains(subproject.name)){apply plugin:'java'sourceCompatibility=1.8targetCompatibility=1.8[compileJava,compileTestJava,javadoc]*.options*.encoding='UTF-8'apply from:"${rootDir}/dependency.gradle"repositories{maven{url='https://maven.aliyun.com/repository/jcenter'}maven{url='https://...
And due to some kapt related error we also had to specifically set Java to the app and its modules like: compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } With this setup we are getting an error when trying to run our unit tests and these...
然而,当我们升级 Gradle 到最新版本时,有时候会遇到一个错误提示:“required compatibility with Java 11”。这是因为 Gradle 要求与 Java 11 兼容,而当前项目中使用的 Java 版本可能低于这个要求。 为了解决这个问题,我们需要做一些配置和调整。下面是一些常见的解决方案: ...
The version of the IntelliJ Platform IDE that will be used to build the plugin. Please seePlugin Compatibility with IntelliJ Platform ProductsandBuild Number Rangesfor more details. Required Type tip Theversion numberformat is the most common option for specifying the version of the IntelliJ Platform...