Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. What's the problem? android compile error

What's the problem? android compile error

Scheduled Pinned Locked Moved Solved Mobile and Embedded
19 Posts 13 Posters 16.0k Views 2 Watching
  • 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.
  • M Offline
    M Offline
    ManSon
    wrote on last edited by
    #1

    Hi every one
    I'm studying to make an Android app using QT..
    After creating a sample project with a test, I tried to android build, but an error occurred.

    0_1554182473314_11처.PNG

    ============ development environment setting. ==
    QT Version : 5.12.2
    QT Creator: 4.8.2
    NDK : r19c
    Java : 1.8.0_201

    ============= Build errors are as follows =================

    Execution failed for task ':compileDebugAidl'.

    java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Na\AppData\Local\Android\Sdk\build-tools\29.0.0-rc1\aidl.exe with arguments {-pC:\Users\Na\AppData\Local\Android\Sdk\platforms\android-28\framework.aidl -oE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\build\generated\source\aidl\debug -IE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\src -IE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\aidl -IC:\Qt\5.12.2\android_arm64_v8a\src\android\java\src -IE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\src\debug\aidl -dC:\Users\Na\AppData\Local\Temp\aidl263087438792580564.d C:\Qt\5.12.2\android_arm64_v8a\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}

    ================ It's a full log. ===================

    13:53:02: Running steps for project QtAndroidTest...
    13:53:02: Configuration unchanged, skipping qmake step.
    13:53:02: Starting: "D:\ndk\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" -j8
    make: Nothing to be done for `first'.
    13:53:03: The process "D:\ndk\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
    13:53:03: Removing directory E:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build/assets
    13:53:04: Removing directory E:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build/libs
    13:53:04: Starting: "D:\ndk\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=E:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build" install
    C:\Qt\5.12.2\android_arm64_v8a\bin\qmake.exe -install qinstall -exe libQtAndroidTest.so E:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\libs\arm64-v8a\libQtAndroidTest.so
    13:53:05: The process "D:\ndk\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
    13:53:05: Starting: "C:\Qt\5.12.2\android_arm64_v8a\bin\androiddeployqt.exe" --input E:/Dev_TestProgram/build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug/android-libQtAndroidTest.so-deployment-settings.json --output E:/Dev_TestProgram/build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug/android-build --android-platform android-28 --jdk "C:/Program Files/Java/jdk1.8.0_201" --gradle
    Generating Android Package
    Input file: E:/Dev_TestProgram/build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug/android-libQtAndroidTest.so-deployment-settings.json
    Output directory: E:/Dev_TestProgram/build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug/android-build/
    Application binary: E:/Dev_TestProgram/build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug/libQtAndroidTest.so
    Android build platform: android-28
    Install to device: No
    -- Skipping C:/Qt/5.12.2/android_arm64_v8a/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so,lib/libQt5Widgets.so.
    -- Skipping C:/Qt/5.12.2/android_arm64_v8a/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so,lib/libQt5Widgets.so.
    :checkDebugClasspath UP-TO-DATE
    :preBuild UP-TO-DATE
    :preDebugBuild UP-TO-DATE
    :compileDebugAidl FAILED

    FAILURE: Build failed with an exception.

    What went wrong:
    Execution failed for task ':compileDebugAidl'.
    java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Na\AppData\Local\Android\Sdk\build-tools\29.0.0-rc1\aidl.exe with arguments {-pC:\Users\Na\AppData\Local\Android\Sdk\platforms\android-28\framework.aidl -oE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\build\generated\source\aidl\debug -IE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\src -IE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\aidl -IC:\Qt\5.12.2\android_arm64_v8a\src\android\java\src -IE:\Dev_TestProgram\build-QtAndroidTest-Android_for_arm64_v8a_Clang_Qt_5_12_2_for_Android_ARM64_v8a-Debug\android-build\src\debug\aidl -dC:\Users\Na\AppData\Local\Temp\aidl263087438792580564.d C:\Qt\5.12.2\android_arm64_v8a\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}

    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 8s
    3 actionable tasks: 1 executed, 2 up-to-date
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
    Building the android package failed!
    -- For more information, run this command with --verbose.
    13:53:22: The process "C:\Qt\5.12.2\android_arm64_v8a\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project QtAndroidTest (kit: Android for arm64-v8a (Clang Qt 5.12.2 for Android ARM64-v8a))
    When executing step "Build Android APK"
    13:53:22: Elapsed time: 00:19.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jay_M
      wrote on last edited by Jay_M
      #2

      BUMP!

      Anyone?!?

      I've got the same frustrating problem! I can create apps using Android Studio, I can create desktop QT apps.... but everything I try to compile a QT Android app fails with a similar failure:

      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':compileDebugAidl'.
      > java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process D:\Android-SDK\build-tools\29.0.0-rc1\aidl.exe with arguments {-pD:\Android-SDK\platforms\android-22\framework.aidl -oD:\Qt\Examples\Qt-5.12.2\gui\build-analogclock-Android_for_x86_Clang_Qt_5_12_2_for_Android_x86-Debug\android-build\build\generated\source\aidl\debug -ID:\Qt\5.12.2\android_x86\src\android\java\src -ID:\Qt\Examples\Qt-5.12.2\gui\build-analogclock-Android_for_x86_Clang_Qt_5_12_2_for_Android_x86-Debug\android-build\src -ID:\Qt\Examples\Qt-5.12.2\gui\build-analogclock-Android_for_x86_Clang_Qt_5_12_2_for_Android_x86-Debug\android-build\src\debug\aidl -ID:\Qt\Examples\Qt-5.12.2\gui\build-analogclock-Android_for_x86_Clang_Qt_5_12_2_for_Android_x86-Debug\android-build\aidl -dC:\Users\pc\AppData\Local\Temp\aidl8825622650137816416.d D:\Qt\5.12.2\android_x86\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}
      
      * 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 6s
      3 actionable tasks: 1 executed, 2 up-to-date
      Building the android package failed!
        -- For more information, run this command with --verbose.
      22:51:26: The process "D:\Qt\5.12.2\android_x86\bin\androiddeployqt.exe" exited with code 14.
      Error while building/deploying project analogclock (kit: Android for x86 (Clang Qt 5.12.2 for Android x86))
      When executing step "Build Android APK"
      22:51:26: Elapsed time: 00:14.
      

      I messed around with various settings, ended up uninstalling and re-installing... still doesn't work!

      It would be great to get this working!

      1 Reply Last reply
      1
      • J Offline
        J Offline
        Jay_M
        wrote on last edited by Jay_M
        #3

        Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

        So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

        1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

        ANDROID_HOME = D:\Android-SDK
        ANDROID_SDK_ROOT = D:\Android-SDK
        GRADLE_USER_HOME = C:\Users\pc\.gradle
        JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
        

        (obviously these need to be upd for your install directories .i.e usually on C: drive)

        Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

        2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
        Select 'show package details' to then be able to select the 28.0.3 version. Apply.

        3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

        androidBuildToolsVersion=28.0.3
        

        Finally: you should probably should close and reopen QT and the project.
        Build/deploy should now (hopefully/finally) work!

        M N M I ali-aydinA 6 Replies Last reply
        10
        • J Jay_M

          Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

          So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

          1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

          ANDROID_HOME = D:\Android-SDK
          ANDROID_SDK_ROOT = D:\Android-SDK
          GRADLE_USER_HOME = C:\Users\pc\.gradle
          JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
          

          (obviously these need to be upd for your install directories .i.e usually on C: drive)

          Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

          2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
          Select 'show package details' to then be able to select the 28.0.3 version. Apply.

          3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

          androidBuildToolsVersion=28.0.3
          

          Finally: you should probably should close and reopen QT and the project.
          Build/deploy should now (hopefully/finally) work!

          M Offline
          M Offline
          ManSon
          wrote on last edited by
          #4

          @Jay_M

          Thank you for solving this problem.
          Thank a ton.

          1 Reply Last reply
          0
          • J Jay_M

            Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

            So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

            1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

            ANDROID_HOME = D:\Android-SDK
            ANDROID_SDK_ROOT = D:\Android-SDK
            GRADLE_USER_HOME = C:\Users\pc\.gradle
            JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
            

            (obviously these need to be upd for your install directories .i.e usually on C: drive)

            Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

            2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
            Select 'show package details' to then be able to select the 28.0.3 version. Apply.

            3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

            androidBuildToolsVersion=28.0.3
            

            Finally: you should probably should close and reopen QT and the project.
            Build/deploy should now (hopefully/finally) work!

            N Offline
            N Offline
            nsis
            wrote on last edited by
            #5

            @Jay_M You made my day!

            1 Reply Last reply
            0
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by Eddy
              #6

              Hi Jay_M,

              Thanks for the solution! Now I can take the jump to Qt5.12.3 with my Android project

              I tested your workarounds and the only thing you have to do is step 3:

              3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:
              
              androidBuildToolsVersion=28.0.3
              

              I tested on some test applications and also on a real world application
              You saved me a lot of time! Now you can save some time for your other projects with less tweaking ;-)

              Eddy

              Qt Certified Specialist
              www.edalsolutions.be

              N 1 Reply Last reply
              3
              • EddyE Eddy

                Hi Jay_M,

                Thanks for the solution! Now I can take the jump to Qt5.12.3 with my Android project

                I tested your workarounds and the only thing you have to do is step 3:

                3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:
                
                androidBuildToolsVersion=28.0.3
                

                I tested on some test applications and also on a real world application
                You saved me a lot of time! Now you can save some time for your other projects with less tweaking ;-)

                Eddy

                N Offline
                N Offline
                nikich340
                wrote on last edited by
                #7

                @Eddy if you have build-tools 28.0.3 downloaded. I just deleted build-tools 29.0.0 and downloaded 28.0.3 (and do not change build folder - it configures for the only one 28.0.3 version which I have).

                1 Reply Last reply
                2
                • EddyE Offline
                  EddyE Offline
                  Eddy
                  wrote on last edited by
                  #8

                  Hi Nikich,

                  good find!

                  I just tested with a new project and deleting the 29.0.0 folder upfront makes Qt Creator find the 28.0.3 folder automatically.

                  Thanks for posting this back here ;-)

                  Eddy

                  Qt Certified Specialist
                  www.edalsolutions.be

                  1 Reply Last reply
                  0
                  • a.burksA Offline
                    a.burksA Offline
                    a.burks
                    wrote on last edited by
                    #9

                    I have a similar problem. I followed the instructions of the tutorial for android and opened the analog clock example to build, deploy and start the app in the Android emulator.

                    I use Qt Creator for macOS with the newest suggested Qt versuin. I get following build errors:

                    /Users/burks/Library/Android/android-ndk-r20/toolchains/x86-4.9/prebuilt/darwin-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lc++
                    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
                    make: *** [libshadereffects.so] Error 1
                    

                    Some ideas, how to make a Qt app for Android running?

                    1 Reply Last reply
                    1
                    • J Offline
                      J Offline
                      JohnAmadis
                      wrote on last edited by
                      #10

                      Hi,

                      I have exactly the same issue. Google Play Console requires adaptation for android-28 and arm64-v8a
                      from August 19, so QT developers cannot use r16b anymore and I have used NDK r20 instead. Unfortunatelly I received -lc++ library linking problem. I am not sure why, because the library is available in the expected path, and objdump returns correct armv7 architecture.

                      To solve the issue with linking I just used android-ndk-19c version. But note, that the 19c contains some bug with support of spaces in the QRC paths, so for example I had to remove this from the QRC:

                      make[1]: *** No rule to make target '/project/fonts/customfont/pobrano z /project/fonts/customfont/koikj.txt', needed by 'qrc_qml.cpp'.  Stop
                      
                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Albertino
                        wrote on last edited by
                        #11

                        The error: cannot find -lc++ using ndk r20 can be solved like this:
                        https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34

                        For example to compile for android armv7 ndk r20, locate the file:
                        C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
                        and add the missing -nostdlib++
                        for android x86 (i use this for emulator), locate the file:
                        C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf

                        For error: Execution failed for task ':compileDebugAidl'
                        locate the file on your build directory, mine is: C:\dev_qt\experiments\build-test_qt_5_13_0_ARMv7-Release\android-build\gradle.properties and change androidBuildToolsVersion
                        from: androidBuildToolsVersion=29.0.0
                        to: androidBuildToolsVersion=28.0.3

                        a.burksA Y 2 Replies Last reply
                        5
                        • A Albertino

                          The error: cannot find -lc++ using ndk r20 can be solved like this:
                          https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34

                          For example to compile for android armv7 ndk r20, locate the file:
                          C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
                          and add the missing -nostdlib++
                          for android x86 (i use this for emulator), locate the file:
                          C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf

                          For error: Execution failed for task ':compileDebugAidl'
                          locate the file on your build directory, mine is: C:\dev_qt\experiments\build-test_qt_5_13_0_ARMv7-Release\android-build\gradle.properties and change androidBuildToolsVersion
                          from: androidBuildToolsVersion=29.0.0
                          to: androidBuildToolsVersion=28.0.3

                          a.burksA Offline
                          a.burksA Offline
                          a.burks
                          wrote on last edited by
                          #12

                          @Albertino Thank your very much. Now I can build and run the calculator example project with the emulator. That's very motivating. However I get many warnings in the log. Maybe the example projects are not optimized for Android. I will check the tutorial a hallo world project.

                          I zygote  : Not late-enabling -Xcheck:jni (already on)
                          W zygote  : Unexpected CPU variant for X86 using defaults: x86
                          W System  : ClassLoader referenced unknown path:
                          I QtCore  : Start
                          W linker  : "/data/app/org.qtproject.example.calculator-LvUUU6gyNuONt6Duq8qL_A==/lib/x86/libQt5Gui.so" has unsupported flags DT_FLAGS_1=0x80
                          W linker  : "/data/app/org.qtproject.example.calculator-LvUUU6gyNuONt6Duq8qL_A==/lib/x86/libQt5Widgets.so" has unsupported flags DT_FLAGS_1=0x80
                          W linker  : "/data/data/org.qtproject.example.calculator/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" has unsupported flags DT_FLAGS_1=0x80
                          I Qt      : qt started
                          D OpenGLRenderer: HWUI GL Pipeline
                          I zygote  : Background concurrent copying GC freed 14726(1133KB) AllocSpace objects, 18(380KB) LOS objects, 52% free, 1407KB/2MB, paused 741us total 254.773ms
                          I zygote  : Do partial code cache collection, code=26KB, data=30KB
                          I zygote  : After code cache collection, code=25KB, data=30KB
                          I zygote  : Increasing code cache capacity to 128KB
                          I zygote  : Background concurrent copying GC freed 14025(1072KB) AllocSpace objects, 20(512KB) LOS objects, 50% free, 1491KB/2MB, paused 53.091ms total 112.459ms
                          I zygote  : Do partial code cache collection, code=50KB, data=56KB
                          I zygote  : After code cache collection, code=48KB, data=55KB
                          I zygote  : Increasing code cache capacity to 256KB
                          D         : HostConnection::get() New Host Connection established 0x9a107280, tid 5700
                          I zygote  : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
                          I OpenGLRenderer: Initialized EGL, version 1.4
                          D OpenGLRenderer: Swap behavior 1
                          W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
                          D OpenGLRenderer: Swap behavior 0
                          
                          A 1 Reply Last reply
                          0
                          • a.burksA a.burks

                            @Albertino Thank your very much. Now I can build and run the calculator example project with the emulator. That's very motivating. However I get many warnings in the log. Maybe the example projects are not optimized for Android. I will check the tutorial a hallo world project.

                            I zygote  : Not late-enabling -Xcheck:jni (already on)
                            W zygote  : Unexpected CPU variant for X86 using defaults: x86
                            W System  : ClassLoader referenced unknown path:
                            I QtCore  : Start
                            W linker  : "/data/app/org.qtproject.example.calculator-LvUUU6gyNuONt6Duq8qL_A==/lib/x86/libQt5Gui.so" has unsupported flags DT_FLAGS_1=0x80
                            W linker  : "/data/app/org.qtproject.example.calculator-LvUUU6gyNuONt6Duq8qL_A==/lib/x86/libQt5Widgets.so" has unsupported flags DT_FLAGS_1=0x80
                            W linker  : "/data/data/org.qtproject.example.calculator/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" has unsupported flags DT_FLAGS_1=0x80
                            I Qt      : qt started
                            D OpenGLRenderer: HWUI GL Pipeline
                            I zygote  : Background concurrent copying GC freed 14726(1133KB) AllocSpace objects, 18(380KB) LOS objects, 52% free, 1407KB/2MB, paused 741us total 254.773ms
                            I zygote  : Do partial code cache collection, code=26KB, data=30KB
                            I zygote  : After code cache collection, code=25KB, data=30KB
                            I zygote  : Increasing code cache capacity to 128KB
                            I zygote  : Background concurrent copying GC freed 14025(1072KB) AllocSpace objects, 20(512KB) LOS objects, 50% free, 1491KB/2MB, paused 53.091ms total 112.459ms
                            I zygote  : Do partial code cache collection, code=50KB, data=56KB
                            I zygote  : After code cache collection, code=48KB, data=55KB
                            I zygote  : Increasing code cache capacity to 256KB
                            D         : HostConnection::get() New Host Connection established 0x9a107280, tid 5700
                            I zygote  : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
                            I OpenGLRenderer: Initialized EGL, version 1.4
                            D OpenGLRenderer: Swap behavior 1
                            W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
                            D OpenGLRenderer: Swap behavior 0
                            
                            A Offline
                            A Offline
                            Albertino
                            wrote on last edited by
                            #13

                            @a.burks these are info/debug messages (not errors), QT is very verbose on android. You can ignore them

                            1 Reply Last reply
                            1
                            • A Albertino

                              The error: cannot find -lc++ using ndk r20 can be solved like this:
                              https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34

                              For example to compile for android armv7 ndk r20, locate the file:
                              C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
                              and add the missing -nostdlib++
                              for android x86 (i use this for emulator), locate the file:
                              C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf

                              For error: Execution failed for task ':compileDebugAidl'
                              locate the file on your build directory, mine is: C:\dev_qt\experiments\build-test_qt_5_13_0_ARMv7-Release\android-build\gradle.properties and change androidBuildToolsVersion
                              from: androidBuildToolsVersion=29.0.0
                              to: androidBuildToolsVersion=28.0.3

                              Y Offline
                              Y Offline
                              Yerson
                              wrote on last edited by
                              #14

                              @Albertino Gracias!! . estuve 2 semanas para arreglar ese error.

                              1 Reply Last reply
                              0
                              • J Jay_M

                                Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

                                So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

                                1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

                                ANDROID_HOME = D:\Android-SDK
                                ANDROID_SDK_ROOT = D:\Android-SDK
                                GRADLE_USER_HOME = C:\Users\pc\.gradle
                                JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
                                

                                (obviously these need to be upd for your install directories .i.e usually on C: drive)

                                Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

                                2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
                                Select 'show package details' to then be able to select the 28.0.3 version. Apply.

                                3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

                                androidBuildToolsVersion=28.0.3
                                

                                Finally: you should probably should close and reopen QT and the project.
                                Build/deploy should now (hopefully/finally) work!

                                M Offline
                                M Offline
                                Mahdi Bouafif
                                wrote on last edited by
                                #15
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • J Jay_M

                                  Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

                                  So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

                                  1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

                                  ANDROID_HOME = D:\Android-SDK
                                  ANDROID_SDK_ROOT = D:\Android-SDK
                                  GRADLE_USER_HOME = C:\Users\pc\.gradle
                                  JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
                                  

                                  (obviously these need to be upd for your install directories .i.e usually on C: drive)

                                  Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

                                  2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
                                  Select 'show package details' to then be able to select the 28.0.3 version. Apply.

                                  3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

                                  androidBuildToolsVersion=28.0.3
                                  

                                  Finally: you should probably should close and reopen QT and the project.
                                  Build/deploy should now (hopefully/finally) work!

                                  M Offline
                                  M Offline
                                  Mahdi Bouafif
                                  wrote on last edited by
                                  #16

                                  @Jay_M My friend i searched for your answer for seven days. I m extremely thankful to you

                                  1 Reply Last reply
                                  0
                                  • J Jay_M

                                    Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

                                    So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

                                    1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

                                    ANDROID_HOME = D:\Android-SDK
                                    ANDROID_SDK_ROOT = D:\Android-SDK
                                    GRADLE_USER_HOME = C:\Users\pc\.gradle
                                    JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
                                    

                                    (obviously these need to be upd for your install directories .i.e usually on C: drive)

                                    Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

                                    2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
                                    Select 'show package details' to then be able to select the 28.0.3 version. Apply.

                                    3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

                                    androidBuildToolsVersion=28.0.3
                                    

                                    Finally: you should probably should close and reopen QT and the project.
                                    Build/deploy should now (hopefully/finally) work!

                                    I Offline
                                    I Offline
                                    iamOgunyinka
                                    wrote on last edited by
                                    #17

                                    @Jay_M Thank you very much, this worked for me!

                                    1 Reply Last reply
                                    0
                                    • J Jay_M

                                      Ok, finally got mine to work. What a %@$# PITA... I really dislike windows, but it's where I chosen do android dev unfortunately.

                                      So... here's what I did... (it may have just been one of these that fixed the issue, but I'm too tired to go back and test them individually)

                                      1st: correct some invalid variables in QT's build settings/build environment (i.e. wrong slash was / instead of \)... AND add some. Specifically:

                                      ANDROID_HOME = D:\Android-SDK
                                      ANDROID_SDK_ROOT = D:\Android-SDK
                                      GRADLE_USER_HOME = C:\Users\pc\.gradle
                                      JAVA_HOME = D:\Program Files\Java\jdk1.8.0_201
                                      

                                      (obviously these need to be upd for your install directories .i.e usually on C: drive)

                                      Note: I specified these in Windows env settings, but it seems like they need to be specifically set in QT's env overrides.

                                      2nd: remove the 29.0.0RC1 from Android SDK build-tools via Android Studio SDK manager. Apply.
                                      Select 'show package details' to then be able to select the 28.0.3 version. Apply.

                                      3rd: go into theQT project/app's folder and edit the gradle.properties file... change the line to:

                                      androidBuildToolsVersion=28.0.3
                                      

                                      Finally: you should probably should close and reopen QT and the project.
                                      Build/deploy should now (hopefully/finally) work!

                                      ali-aydinA Offline
                                      ali-aydinA Offline
                                      ali-aydin
                                      wrote on last edited by
                                      #18

                                      @Jay_M said in What's the problem? android compile error:

                                      theQT project/app's folder and edit the gradle.properties file

                                      where is " theQT project/app's folder and edit the gradle.properties file" file or directory?
                                      i can't find it

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • ali-aydinA ali-aydin

                                        @Jay_M said in What's the problem? android compile error:

                                        theQT project/app's folder and edit the gradle.properties file

                                        where is " theQT project/app's folder and edit the gradle.properties file" file or directory?
                                        i can't find it

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        @ali-aydin said in What's the problem? android compile error:

                                        where is " theQT project/app's folder

                                        It's you project folder where the source code is.

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        0

                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups
                                        • Search
                                        • Get Qt Extensions
                                        • Unsolved