Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Build for Android - Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

    Installation and Deployment
    3
    3
    3165
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PawlosCK last edited by PawlosCK

      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.

      1 Reply Last reply Reply Quote 1
      • G
        grantviolet 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 changed gradle-5.6.4-bin.zip to gradle-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!

        T 1 Reply Last reply Reply Quote 1
        • T
          T1000 @grantviolet last edited by

          @grantviolet Yes, your method helped me. Thanks. But my path was that: ...\src\3rdparty\gradle\gradle\wrapper\gradle-wrapper.properties

          1 Reply Last reply Reply Quote 0
          • First post
            Last post