Я изменил версию jdk в проекте, gradle jvm и изменил версию gradle на 7.4 с 6.6.
Я также изменил файл org.gradle.jvmargs в файле gradle.properties с этого -Xmx4g -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8 на этот org.gradle.jvmargs=-Xmx4g -XX: +UseZGC -Dfile.encoding=UTF-8
Но когда я обновляю зависимости, я получаю сообщение об ошибке -
Код: Выделить всё
A problem occurred evaluating root project .
> Failed to apply plugin 'org.gradle.java'.
> Cannot have two attributes with the same name but different types. This container already has an attribute named 'org.gradle.jvm.environment' of type 'java.lang.String' and you are trying to store another one of type 'org.gradle.api.attributes.java.TargetJvmEnvironment'
Код: Выделить всё
subprojects {
apply plugin: 'jacoco'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java'
project.allprojects {subproject ->
subproject.configurations.all{
try {
attributes {
attribute(Attribute.of('org.gradle.jvm.environment', String), 'standard-jvm')
}
}
catch(Exception e){}
}
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... ith-jdk-17
Мобильная версия