![]() |
发财的熊猫 · 嗨碰视频 - 向在炮火连天第一线战斗的原创者致敬!· 4 天前 · |
![]() |
慈祥的课本 · AttributeError: ...· 4 天前 · |
![]() |
神勇威武的山羊 · [Day 20] 機器學習金手指 - ...· 2 天前 · |
![]() |
爱喝酒的甜瓜 · Espresso 设置说明 | ...· 昨天 · |
![]() |
好帅的小熊猫 · OpenPDF/pdf-toolbox/sr ...· 19 小时前 · |
![]() |
宽容的黑框眼镜 · Failed to test ...· 4 月前 · |
![]() |
体贴的柿子 · 证券配资网 iQOO加速电竞赛道布局 ...· 6 月前 · |
![]() |
好帅的大熊猫 · Diff Inline View is ...· 6 月前 · |
![]() |
热心的烈马 · 新款路虎揽胜运动版插电式混合动力车型P400 ...· 1 年前 · |
![]() |
光明磊落的高山 · svn项目迁移至gitlab流程(保留提交记 ...· 1 年前 · |
adp
Task
target~
path
The SDK requires a JDK 11, so when a JDK 8 is used, the following kind of errors are raised:
When fetching the MicroEJ Gradle plugin:
A problem occurred configuring root project 'myProject'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.microej.gradle.plugins:plugins:0.3.0.
Required by:
project : > com.microej.gradle.addon-library:com.microej.gradle.addon-library.gradle.plugin:0.3.0:20221118.151454-1
> No matching variant of com.microej.gradle.plugins:plugins:0.3.0:20221118.151454-1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.4' but:
- Variant 'apiElements' capability com.microej.gradle.plugins:plugins:0.3.0 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4')
- Variant 'javadocElements' capability com.microej.gradle.plugins:plugins:0.3.0 declares a runtime of a component, and its dependencies declared externally:
- 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)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4')
- Variant 'runtimeElements' capability com.microej.gradle.plugins:plugins:0.3.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4')
- Variant 'sourcesElements' capability com.microej.gradle.plugins:plugins:0.3.0 declares a runtime of a component, and its dependencies declared externally:
- 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)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4')
When using the MicroEJ Gradle plugin:
Cause: com/microej/gradle/plugins/MicroejApplicationGradlePlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
The solution is to use a JDK 11 or a higher LTS version (11
, 17
or 21
) to fix this error:
For the command line interface, make sure that a supported JDK version is defined in the PATH
environment.
To check, run java -version
. You should see something like this:
$ java -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment Temurin-11.0.14.1+1 (build 11.0.14.1+1)
OpenJDK 64-Bit Server VM Temurin-11.0.14.1+1 (build 11.0.14.1+1, mixed mode)
Alternatively, you can set the JAVA_HOME
environment variable to point to the installation directory of the JDK.
For Android Studio and IntelliJ IDEA, go to File > Settings… > Build, Execution, Deployment > Build Tools > Gradle,
and make sure the selected Gradle JVM is a supported JDK version:
Unresolved Dependency
If this kind of message appears when resolving plugins or modules dependencies:
* What went wrong:
Plugin [id: 'com.microej.gradle.application', version: '0.19.0'] was not found in any of the following sources:
or this kind:
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find com.mycompany:mymodule:M.m.p.
Searched in the following locations:
- https://my-company-first-repository/com/mycompany/mymodule/M.m.p/kf-M.m.p.pom
- https://my-company-first-repository/com/mycompany/mymodule/M.m.p/ivy-M.m.p.xml
- https://my-company-second-repository/com/mycompany/mymodule/M.m.p/kf-M.m.p.pom
- https://my-company-second-repository/com/mycompany/mymodule/M.m.p/ivy-M.m.p.xml
Required by:
project :
First, check that either the requested plugin or module exists in your repository.
If the plugin or module does not exist,
if it is declared as a direct dependency, the module repository is not compatible with your source code.
You can either check if another module version is available in the repository or add the missing module to the repository.
otherwise, this is likely a missing transitive module dependency. The module repository is not consistent.
Check the module repository and make sure all the transitive dependencies exist.
If the module exists, this may be due to a missing repository in the configuration.
Check that your repository appears in the list of URLs below the error line:
Searched in the following locations:
If the URL of your repository is not listed, add it to the list of the repositories.
If the repository is correctly configured, this may be a network connection error.
We can check in the debug logs, by adding the --debug
arguments in the Gradle command line.
Otherwise, if your module repository is an URL, check for an Invalid SSL Certificate issue.
Invalid SSL Certificate
If a dependency cannot be retrieved from a remote repository, this may be due to a missing or incorrect SSL certificate.
It can be checked in the debug logs, by adding the --debug
and -Djavax.net.debug=all
arguments in the Gradle command line, for example:
./gradlew build --debug -Djavax.net.debug=all
If the SSL certificate is missing or incorrect, the following line should appear:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This can be raised in several cases, such as:
an artifact repository configured in the MicroEJ Module Manager settings using a self-signed SSL certificate or a SSL certificate not trusted by the JDK.
the requests to an artifact repository configured in the MicroEJ Module Manager settings are redirected to a proxy server using a SSL certificate not trusted by the JDK.
In all cases, the SSL certificate (used by the artifact repository server or the proxy) must be added to the JDK trust store that is running Gradle.
Before updating the SSL certificate, it is recommended to exit all your IDE projects and stop Gradle daemons (all versions).
One simple way is to list all Java processes and kill the ones named GradleDaemon
: