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

Build APK in QT 5.8 [error /ant/build.xml:649]



  • i want build apk and get this error,

    BUILD FAILED
    C:\Users\Ilham Firdaus\AppData\Local\Android\android-sdk\tools\ant\build.xml:649: The following error occurred while executing this line:
    C:\Users\Ilham Firdaus\AppData\Local\Android\android-sdk\tools\ant\build.xml:694: null returned: 1
    
    Total time: 1 second
    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
    Building the android package failed!
      -- For more information, run this command with --verbose.
    14:08:22: The process "C:\Qt\Qt5.8.0\5.8\android_armv7\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project untitled (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
    When executing step "Build Android APK"
    

    and this is in ../ant/build.xml

        <!-- Code Generation: compile resources (aapt -> R.java), aidl, renderscript -->
        <target name="-code-gen">
            <!-- always merge manifest -->
            <mergemanifest
                    appManifest="${manifest.abs.file}"
                    outManifest="${out.manifest.abs.file}"
                    enabled="${manifestmerger.enabled}">
                <library refid="project.library.manifest.file.path" />
            </mergemanifest>
    
            <do-only-if-manifest-hasCode
                    elseText="hasCode = false. Skipping aidl/renderscript/R.java"> //this is in line 649
                <echo level="info">Handling aidl files...</echo>
                <aidl executable="${aidl}"
                        framework="${project.target.framework.aidl}"
                        libraryBinAidlFolderPathRefid="project.library.bin.aidl.folder.path"
                        genFolder="${gen.absolute.dir}"
                        aidlOutFolder="${out.aidl.absolute.dir}">
                    <source path="${source.absolute.dir}"/>
                </aidl>
    

    i don't know about this error, can anyone help me?



  • Its solved, try to change the android target in Projects > Android Build SDK or update your API in SDK tools, thanks Qt :*


Log in to reply