Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › Can't perform android app release

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

    sAMA SAMA

    From what I understand you need to build release the app to get the final APK right?

    I keep getting the following errors on the console output:

    E:\felgo\Felgo\android_armv7\bin\qmlcachegen.exe --resource=D:/felgoProjects/TabTab_final/resources.qrc -o qml_helper_SectionContent_qml.cpp ..\TabTab_final\qml\helper\SectionContent.qml
    No resource path for file: ..\TabTab_final\qml\helper\SectionDescription.qml
    make: *** [qml_helper_SectionDescription_qml.cpp] Error 1
    make: *** Waiting for unfinished jobs....
    No resource path for file: ..\TabTab_final\qml\helper\PluginListItem.qml
    No resource path for file: ..\TabTab_final\qml\helper\SectionContent.qml
    make: *** [qml_helper_PluginListItem_qml.cpp] Error 1
    make: *** [qml_helper_SectionContent_qml.cpp] Error 1
    18:20:13: The process "D:\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
    Error while building/deploying project TabTab_final (kit: Android for armeabi-v7a (Clang Qt 5.13.2 for Android ARMv7))
    When executing step "Make"
    18:20:13: Elapsed time: ٠:٠٠:٠٢.

    I did all the requirements for publishing on the .pro file and main.cpp, what can I do to fix the issue?

    #22573

    Alex
    Felgo Team

    Hi,

    did you add all your qml/js files to the *qrc resource file, with the correct path? This is needed if the Qt Quick Compiler is used, which is default for Android release builds.

    Best,
    Alex

    #22579

    sAMA SAMA

    True, I add them later and the build was successful, but I only get the debug build not the release one, I can’t upload it to google play.

    Console output after I tried cleaning the project:

    14:13:04: Running steps for project TabTab_final...
    14:13:04: Starting: "D:\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" clean -j4
    del qrc_resources_qmlcache.cpp qrc_resources_user.cpp
    del qml_Main_qml.cpp qml_PluginMainItem_qml.cpp qml_helper_SectionDescription_qml.cpp qml_helper_PluginListItem_qml.cpp qml_helper_SectionContent_qml.cpp qml_helper_SectionHeader_qml.cpp qml_helper_Constants_qml.cpp qml_pages_AdMobPage_qml.cpp
    del qmlcache_loader.cpp
    del moc_predefs.h
    Could Not Find D:\felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\moc_predefs.h
    del main.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qrc_resources_qmlcache.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qrc_resources_user.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_Main_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_PluginMainItem_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_helper_SectionDescription_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_helper_PluginListItem_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_helper_SectionContent_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_helper_SectionHeader_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_helper_Constants_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qml_pages_AdMobPage_qml.obj felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\qmlcache_loader.obj
    del *~ core *.core
    Could Not Find D:\felgoProjects\build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release\*~
    14:13:07: The process "D:\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
    14:13:07: Elapsed time: ٠:٠٠:٠٣.

    Output console after trying to perform a release build:

    14:14:29: Running steps for project TabTab_final...
    14:14:29: Starting: "E:\felgo\Felgo\android_armv7\bin\qmake.exe" D:\felgoProjects\TabTab_final\TabTab_final.pro -spec android-clang "CONFIG+=qtquickcompiler"
    QDir::mkpath: Empty or null file name
    WARNING: Cannot create directory ''
    QDir::mkpath: Empty or null file name
    WARNING: Cannot create directory ''
    14:14:33: The process "E:\felgo\Felgo\android_armv7\bin\qmake.exe" exited normally.
    14:14:34: Starting: "D:\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" -f D:/felgoProjects/build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release/Makefile qmake_all
    make: Nothing to be done for `qmake_all'.
    14:14:36: The process "D:\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
    14:14:36: Starting: "D:\android-ndk-r19c-windows-x86_64\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" -j4
    
    ///Some other stuff
    
    BUILD SUCCESSFUL in 1m 4s
    28 actionable tasks: 28 up-to-date
    Android package built successfully in 132.629 ms.
      -- File: D:/felgoProjects/build-TabTab_final-Android_for_armeabi_v7a_Clang_Qt_5_13_2_for_Android_ARMv7-Release/android-build//build/outputs/apk/debug/android-build-debug.apk
    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.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.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.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
    14:17:12: The process "E:\felgo\Felgo\android_armv7\bin\androiddeployqt.exe" exited normally.
    14:17:12: Elapsed time: ٠:٠٢:٤٣.
    
    
    

    I changed the .pro and config.json files to perform publishing, are there other steps I forgot?

    #22606

    Alex
    Felgo Team

    It says that the build was successful, is there any issue that you experience?

    You can ignore the warnings.

    Cheers,
    Alex

    #24127

    Nathan

    I’m seeing this same error.

    The issue us that the build process always creates “android-build-debug.apk”, even when you specify that you want a release build.

    The Google Play store then complains that of the APK being a debug version instead of a release version.

    Also, the APK is huge. I’m assuming this would be much smaller for a release version.

    I’ve followed all instructions regarding release:

    • Comment DEPLOYMENTFOLDERS in .pro file
    • List all QML files in .qrc folder
    • set setMainQmlFileName in main.cpp file
    • Make sure “Release” is selected in

     

    #24129

    Alex
    Felgo Team

    Hi Nathan,

    make sure to closely follow this doc: https://felgo.com/doc/felgo-publishing/

    Don’t forget to set your “stage” property in the config.json file to “publish”.

    Also make sure to properly add your signing info in Qt Creator, so a properly signed release apk can be generated.

    Once you switched the target to “Release” in Qt Creator (https://felgo.com/doc/felgo-publishing/#build-your-android-project-for-distribution) your shadow build folder will also change to a different location, so make sure to look for the resulting apk there.

    Best,
    Alex

    #24132

    Nathan

    Thanks Alex,

    All of your above suggestions had already been tried except for dealing with the signing keys.

    I ignored that step because on the previous App, I never built local, and so the settings for the previous app, I didn’t use signing keys inside QC.

    Second part of the issue had to do with the setup of the cloud build. The initial setup was set to “Development”, but needed to be switched to “Distribution”.

    So the steps should have been:

    • Comment DEPLOYMENTFOLDERS in .pro file
    • List all QML files in .qrc folder
    • set setMainQmlFileName in main.cpp file
    • Make sure “Release” is selected as Build target within QC
    • To build locally, in “Build & Run” settings -> “Build Android APK”, make sure to use sign package, even if you’ve elected to let Google manage signing inside the Google Play store
    • If using Cloud Build, be sure to change “Platforms & Distributions” target to “Distribution” and upload appropriate signing key.

    Hope this saves others the time and headache.

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

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded