配置完Linux+Qt5.15.2+Android环境,使用JDK17,其他JDK版本1.8、11、21版本都没办法成功配置SDK,新建项目,编译不通过,神仙帮忙看下,能解决的直接打赏,不用跟别人平分。
/home/xuguijun/Qt/5.15.2/android/bin/qmake -install qinstall -exe libandroidTest_armeabi-v7a.so /home/xuguijun/Desktop/build-androidTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-build/libs/armeabi-v7a/libandroidTest_armeabi-v7a.so
16:10:46: 进程"/home/xuguijun/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make"正常退出。
16:10:46: Starting: "/home/xuguijun/Qt/5.15.2/android/bin/androiddeployqt" --input /home/xuguijun/Desktop/build-androidTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-androidTest-deployment-settings.json --output /home/xuguijun/Desktop/build-androidTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-build --android-platform android-30 --jdk /home/xuguijun/jdk-17.0.9 --gradle
Generating Android Package
Input file: /home/xuguijun/Desktop/build-androidTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-androidTest-deployment-settings.json
Output directory: /home/xuguijun/Desktop/build-androidTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-build/
Application binary: androidTest
Android build platform: android-30
Install to device: No
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
> Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache [in thread "Daemon worker"]
* 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 981ms
Building the android package failed!
-- For more information, run this command with --verbose.
-- Skipping /home/xuguijun/Qt/5.15.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so.
-- Skipping /home/xuguijun/Qt/5.15.2/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so.
Skipping createRCC
16:10:48: 进程"/home/xuguijun/Qt/5.15.2/android/bin/androiddeployqt"退出,退出代码 14 。
Error while building/deploying project androidTest (kit: Android Qt 5.15.2 Clang Multi-Abi)
The kit Android Qt 5.15.2 Clang Multi-Abi has configuration issues which might be the root cause for this problem.
When executing step "Build Android APK"