Vamshi Kodipaka
09/04/2024, 10:48 AMsudo apt install default-jre
cd ~/ros2_ws
git clone --recurse-submodules <https://github.com/ardupilot/Micro-XRCE-DDS-Gen.git>
cd Micro-XRCE-DDS-Gen
./gradlew assemble
especially at this ./gradlew assemble line
i got this error and could not build:
/ros2_ws/Micro-XRCE-DDS-Gen$ ./gradlew assemble
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Micro-XRCE-DDS-Gen'.
> Could not open proj generic class cache for build file '/home/atron/ros2_ws/Micro-XRCE-DDS-Gen/build.gradle' (/home/atron/.gradle/caches/7.6/scripts/42wrcmai01iajc9hhks7fd9yc).
> BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 65
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 340ms
please help!ASIF KAMRAN MALICK
09/04/2024, 11:42 AMBUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 65
As per this compatibility matrix https://docs.gradle.org/current/userguide/compatibility.html your gradle version 7.6 is not compatible with class file major version 65 which actually corresponds to Java 21.
For Gradle 7.6 you cannot use anything later than Java 19.Vamshi Kodipaka
09/04/2024, 12:16 PMgradle wrapper --gradle-version 8.5
it says: build successful in 311ms
1 actionable task: 1 up-to-date
and then do
./gradlew assemble
i get:
> Task :buildIDLParser FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/atron/ros2_ws/Micro-XRCE-DDS-Gen/thirdparty/IDL-Parser/build.gradle' line: 74
* What went wrong:
A problem occurred evaluating project ':IDL-Parser'.
> Could not set unknown property 'classifier' for task ':IDL-Parser:sourceJar' of type org.gradle.api.tasks.bundling.Jar.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 374ms
2 actionable tasks: 2 executed
please help!Vampire
09/04/2024, 4:27 PM