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. APK Build Failed -
Qt 6.11 is out! See what's new in the release blog

APK Build Failed -

Scheduled Pinned Locked Moved Solved Mobile and Embedded
qt mobile
5 Posts 3 Posters 4.1k Views
  • 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
    Mathan M
    wrote on last edited by
    #1

    Hi All,

    I created an simple app using Android Qt 5.7.

    when I try to compile/Build the project for APK file, I am receiving an error message :
    BUILD Failed.

    I am just posting my log which presents in 4 compiler Output:

    10:50:31: Running steps for project QtQuickMMPKLoad...
    10:50:31: Configuration unchanged, skipping qmake step.
    10:50:31: Starting: "D:\QTIDE\Qt570Android\Tools\mingw530_32\bin\mingw32-make.exe"
    mingw32-make: Nothing to be done for 'first'.
    10:50:32: The process "D:\QTIDE\Qt570Android\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    10:50:32: Removing directory E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build
    10:50:33: Starting: "D:\QTIDE\Qt570Android\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT=E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build" install
    copy /y libQtQuickMMPKLoad.so E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\libs\armeabi-v7a\libQtQuickMMPKLoad.so
    1 file(s) copied.
    10:50:33: The process "D:\QTIDE\Qt570Android\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    10:50:33: Starting: "D:\QTIDE\Qt570Android\5.7\android_armv7\bin\androiddeployqt.exe" --input E:/QtProjectTest/Reference/BackUp/QtQuickMMPKLoad/build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-libQtQuickMMPKLoad.so-deployment-settings.json --output E:/QtProjectTest/Reference/BackUp/QtQuickMMPKLoad/build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build --deployment bundled --android-platform android-16 --jdk "C:/Program Files (x86)/Java/jdk1.7.0_55" --ant C:/ApacheAnt/bin/ant.bat
    Generating Android Package
    Input file: E:/QtProjectTest/Reference/BackUp/QtQuickMMPKLoad/build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-libQtQuickMMPKLoad.so-deployment-settings.json
    Output directory: E:/QtProjectTest/Reference/BackUp/QtQuickMMPKLoad/build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build/
    Application binary: E:/QtProjectTest/Reference/BackUp/QtQuickMMPKLoad/build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/libQtQuickMMPKLoad.so
    Android build platform: android-16
    Install to device: No
    Buildfile: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\build.xml

    -set-mode-check:

    -set-debug-files:

    -check-env:
    [checkenv] Android SDK Tools Revision 25.1.7
    [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk

    -setup:
    [echo] Project Name: QtApp
    [gettype] Project Type: Application

    -set-debug-mode:

    -debug-obfuscation-check:

    -pre-build:

    -build-setup:
    [getbuildtools] Using latest Build Tools: 24.0.1
    [echo] Resolving Build Target for QtApp...
    [gettarget] Project Target: Android 4.1.2
    [gettarget] API level: 16
    [echo] ----------
    [echo] Creating output directories if needed...
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\res
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\rsObj
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\rsLibs
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\gen
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\classes
    [mkdir] Created dir: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\dexedLibs
    [echo] ----------
    [echo] Resolving Dependencies for QtApp...
    [dependency] Library dependencies:
    [dependency] No Libraries
    [dependency]
    [dependency] ------------------
    [echo] ----------
    [echo] Building Libraries with 'debug'...
    [subant] No sub-builds to iterate on

    -code-gen:
    [mergemanifest] Merging AndroidManifest files into one.
    [mergemanifest] Manifest merger disabled. Using project manifest only.
    [echo] Handling aidl files...
    [aidl] Found 2 AIDL files.
    [aidl] Compiling 2 AIDL files.
    [echo] ----------
    [echo] Handling RenderScript files...
    [echo] ----------
    [echo] Handling Resources...
    [aapt] Generating resource IDs...
    [aapt] warning: string 'unsupported_android_version' has no default translation.
    [echo] ----------
    [echo] Handling BuildConfig class...
    [buildconfig] Generating BuildConfig class.

    -pre-compile:

    -compile:
    [javac] Compiling 10 source files to E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

    -post-compile:

    -obfuscate:

    -dex:
    [dex] input: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\bin\classes
    [dex] input: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\libs\QtAndroidBearer-bundled.jar
    [dex] input: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\libs\QtAndroid-bundled.jar
    [dex] input: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\libs\QtSensors-bundled.jar
    [dex] input: E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\libs\QtPositioning-bundled.jar
    [dex] Pre-Dexing E:\QtProjectTest\Reference\BackUp\QtQuickMMPKLoad\build-QtQuickMMPKLoad-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug\android-build\libs\QtAndroidBearer-bundled.jar -> QtAndroidBearer-bundled-4c306bb11d72663e709bc304cd541694.jar
    [dx] java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
    [dx] at java.lang.ClassLoader.defineClass1(Native Method)
    [dx] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    [dx] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    [dx] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    [dx] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    [dx] at java.security.AccessController.doPrivileged(Native Method)
    [dx] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
    [dx] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    [dx] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
    [dx] Exception in thread "main"

    BUILD FAILED
    C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:888: The following error occurred while executing this line:
    C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:890: The following error occurred while executing this line:
    C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:902: The following error occurred while executing this line:
    C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:283: null returned: 1

    Total time: 2 seconds
    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.
    10:50:44: The process "D:\QTIDE\Qt570Android\5.7\android_armv7\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project QtQuickMMPKLoad (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
    When executing step "Build Android APK"
    10:50:44: Elapsed time: 00:13.

    Thanks in advance.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      You might have the same issue as here:
      http://stackoverflow.com/questions/38202528/an-error-while-building-an-android-app-on-qt

      1 Reply Last reply
      0
      • BonganiB Offline
        BonganiB Offline
        Bongani
        wrote on last edited by
        #3

        @Mathan-M, did you finally find a solution for this problem ?

        M 1 Reply Last reply
        0
        • BonganiB Bongani

          @Mathan-M, did you finally find a solution for this problem ?

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

          Hi @Bongani ,

          31/07 - Sunday, Java had pushed some updates, So contradiction on version raised.

          Downloaded the latest JDK from the java site and installed, Now Its working.

          Thanks for the reply.

          MM

          1 Reply Last reply
          0
          • BonganiB Offline
            BonganiB Offline
            Bongani
            wrote on last edited by
            #5

            Thanks @Mathan-M, It also worked for me. I think we can mark this as solved.

            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