Build for Android - Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
-
wrote on 8 Dec 2020, 19:25 last edited by PawlosCK 12 Aug 2020, 19:43
I have problem with building app for Android. Yesterday, everything worked, but today I can't build app.
I tried to install Qt6 but It didn't work, so I decided to back to qt5.15 and now I can't build app for Android.
Generating Android Package * Input file: /020_QML_Controls/build-QML_Controls-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-QML_Controls-deployment-settings.json * Output directory: /020_QML_Controls/build-QML_Controls-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-build/ * Application binary: QML_Controls * Android build platform: android-29 * Install to device: No * Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils * Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils * Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils * Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils * -- Skipping /home/pawel/Qt/5.15.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86_64.so. It has unmet dependencies: lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. * -- Skipping /home/pawel/Qt/5.15.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86_64.so. It has unmet dependencies: lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. * -- Skipping /home/pawel/Qt/5.15.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. * -- Skipping /home/pawel/Qt/5.15.2/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. * * FAILURE: Build failed with an exception. * * * What went wrong: * Could not initialize class org.codehaus.groovy.runtime.InvokerHelper * * * 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 355ms * Building the android package failed! * -- For more information, run this command with --verbose. * 20:40:16: The process "/home/pawel/Qt/5.15.2/android/bin/androiddeployqt" exited with code 14. * Error while building/deploying project QML_Controls (kit: Android Qt 5.15.2 Clang Multi-Abi) * When executing step "Build Android APK"
My knowledge connected with Android is low, so please describe step by step what I have to do.
-
wrote on 8 Jan 2021, 16:48 last edited by
I've spent many hours trying to resolve the same (or very similar) problem and I think I've finally fixed it. It seems that an old (5.6.4) version of Gradle was being specified.
In.../Qt/5.15.2/android/src/3rdparty/gradle/gradle.properties
I changedgradle-5.6.4-bin.zip
togradle-6.5-bin.zip
and then it worked.
This doesn't seem like the correct fix for the issue, so I'd be interested to know what the correct fix should be! -
I've spent many hours trying to resolve the same (or very similar) problem and I think I've finally fixed it. It seems that an old (5.6.4) version of Gradle was being specified.
In.../Qt/5.15.2/android/src/3rdparty/gradle/gradle.properties
I changedgradle-5.6.4-bin.zip
togradle-6.5-bin.zip
and then it worked.
This doesn't seem like the correct fix for the issue, so I'd be interested to know what the correct fix should be!wrote on 25 Jan 2021, 20:21 last edited by@grantviolet Yes, your method helped me. Thanks. But my path was that: ...\src\3rdparty\gradle\gradle\wrapper\gradle-wrapper.properties