Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android project build error



  • Hello!

    I want to build the test project for Android, but it displays the following error:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring root project 'android-build'.
    > Cannot convert URL 'C:Qt5.13.1android_arm64_v8a/src/android/java/res' to a file.
    
    * 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 9s
      -- Skipping C:/Qt/5.13.1/android_arm64_v8a/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so.
      -- Skipping C:/Qt/5.13.1/android_arm64_v8a/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so.
    Building the android package failed!
      -- For more information, run this command with --verbose.
    13:26:31: The process "C:\Qt\5.13.1\android_arm64_v8a\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project TestMobile (kit: Android for arm64-v8a (Clang Qt 5.13.1 (android_arm64_v8a)))
    When executing step "Build Android APK"
    

    I have configured SDK/NDK successfully:

    2019-10-06_132919.png

    2019-10-06_133213.png 2019-10-06_133225.png

    How to fix this issue? Thanks.



  • This post is deleted!


  • I have removed the Android Studio and checked it again, but still the same error.

    * What went wrong:
    A problem occurred configuring root project 'android-build'.
    > Cannot convert URL 'C:Qt5.13.1android_armv7/src/android/java/res' to a file.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --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
    Building the android package failed!
    09:49:02: The process "C:\Qt\5.13.1\android_armv7\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project TestMobile (kit: Android for armeabi-v7a (Clang Qt 5.13.1 (android_armv7)))
    When executing step "Build Android APK"
    

    To investigate this issue better, I must run these commands: -stacktrace, --debug, --scan. How to add these parameters to Qt Creator? Thanks.



  • I have fixed the issue, the problem was with wrong project path, also I set ANDROID_HOME and ANDROID_SDK_ROOT environment variables. The issue is resolved.


Log in to reply