Forums

OverviewFelgo 2 Support (Qt 5) › Problem when builds apk

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #16031

    Mariano

    I have this error when builds apk

    Buildfile: build.xml does not exist!

    Build failed

    Warning: Android platform ‘android–1’ does not exist in SDK.

    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.impl

    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.Controls.Universal.impl

    Building the android package failed!

    — For more information, run this command with –verbose.

    00:23:36: The process “C:\Users\asinf\FelgoSDK\5.8\android_armv7\bin\androiddeployqt.exe” exited with code 14.

    Error while building/deploying project untitled3 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))

    When executing step “Build Android APK”

     

    Exists a solution for this. Thanks

    #16033

    Günther
    Felgo Team

    Hi Mariano!

    Please see here for our guide about Android Deployment to check all steps if you installed the required tools correctly.

    The error “Buildfile: build.xml does not exist!” suggests that you are not using the Gradle Build System, please activate it for your project.

    The warning “Android platform ‘android–1’ does not exist in SDK.” can indicate that your Android SDK version was not detected correctly. If the error still exists after switching to Gradle, please try to:

    • Close your project and Qt Creator if opened
    • Delete your shadow build directory from your file system
    • Remove the *.pro.user file of your project
    • Reopen Qt Creator and open your project (you can now again select your desired Build Kits, the *.pro.user file is created again now)
    • Right-click on the project in Qt Creator and select “Clean”
    • Right-click again and select “Run qmake”
    • Try rebuilding and running the project
    • If the Android version still is not detected, please try to manually set your SDK version by opening the *.pro.user file of your project and replacing any occurrences of android-1 with your desired version (e.g. android-25, you can check which version you have installed with the Android SDK Manager). Please also close/reopen the project after changing the *.pro.user file and again perform the above clean steps (except deleting the *.pro.user file).

    Are you able to build for Android then?

    Best,
    Günther from Felgo

     

     

    #16042

    Mariano

    thanks, after investigate, the problem is with the last sdk tool android. qtcreator have error with build apk, with last sdk tool

    Even in the projetc page, in sdk build, the combo is null

    I change *.pro.user to android-25 and that error is solve.

    Now the error is cannot find directory of template gradle wrapper, this is the problem with the last sdk tool with qtcreator.

    exist information in forum of qt

    I try to find tool in separate way and try to work and write again to inform.

    Thanks

    #16043

    Mariano

    Finally, i can build a apk.

    In qtcreator forum i downloaded the android sdk tool 25.2.5 (the last working with qtcreator) and extract in the folder of sdk/tool

    Is necesary edit *.pro.user, because qtcreator not recongnize android sdk for the change of directories that make google.

    I hope that this problem be solve.

    Thanks

    #16044

    Günther
    Felgo Team

    Hi Mariano!

    Glad to hear you got it working,
    compatibility of Qt and other required tools and SDKs can sometimes be a bit of a hassle, especially when new versions come out.

    You can try to set environment variables on your system for the PATH of your Android SDK, NDK and the used Android API version to fix the auto-detection of Qt Creator:

    • ANDROID_SDK_ROOT=<YOUR_ANDROID_SDK_PATH>
    • ANDROID_NDK_PATH=<YOUR_ANDROID_NDK_PATH>
    • ANDROID_API_VERSION=android-25

    After setting these variables, try reopening Qt Creator and creating a new project to see if the detection works now.
    If it doesn’t help, I suggest going with the workaround of editing the *.pro.user file for now.

    Cheers,
    Günther

    #16047

    Lorenz

    This issue is related to a Qt Bug which should be fixed in the next version of Qt. The problem is that Google broke the compatibility with Qt with the release of Build Tools Version 25.3.1.: https://bugreports.qt.io/browse/QTBUG-59236

    Until this is not resolved, it’s recommended to NOT UPGRADE your Build Tools to 25.3.1. and stay on older versions instead.

    If you already upgraded, you can downgrade again. Here are the links:

    macOS: https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip
    Windows: https://dl.google.com/android/repository/tools_r25.2.5-windows.zip
    Linux: https://dl.google.com/android/repository/tools_r25.2.5-linux.zip

     

     

    #16050

    Mariano

    OK, I will use 25.2.5.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support