[Solved]Official Qt 5.1 android application deploy error on device ..

  • Moderators

    hi all,

    I downloaded the latest official Qt-5.1 for android using the offline installer Qt 5.1.0 for Android (Linux 32-bit, 463 MB) , latest ndk (android-ndk-r8e-linux-x86.tar.bz2) sdk(adt-bundle-linux-x86-20130522.zip),Ant tool v1.9 and Java jdk 6. I did the necessary configurations in QtCreator's(Setting ndk,sdk, ant and jdk) Projects > Android.

    I'm using GCC 4.4.3 for compiling with arch armv7-a. I have set Android Target Sdk to Android-10
    The code compiiles fine and apk is also created but i get error "Your application encountered fatal error and cannot continue".
    My target device is android tablet. Following are details

    1. Android 4.0.3
    2. getprop ro.product.cpu.abi = armeabi-v7a

    Following is the more detailed log from logcat from device:

    "Logcat Error logs on device":http://pastebin.com/43Je5Wxr

    So am i using the correct NDK, SDK's for development ? or is there any other configurations to be done ?

  • Ye, the ndk and sdk are fine.
    Do you use openjdk 6?
    Ive been using ant 1.8.2 so far and its good, but I dont think 1.9 would cause this.

    What are your deploy configurations?
    Maybe share the source code? It looks like some simple example

  • Moderators

    Thanks for reply Moster,

    Yes i'm using openjdk 6.
    I have kept "Use Qt libraries from devices" and checked "Use Local Qt libraries"

    Yes its a simple Test code with QMainwindow nothing else written in code.

    The following is first compile output:
    /root/Qt5-Android-deps/Android-ndk/android-ndk-r8e/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt-And/Qt5.1.0/5.1.0/android_armv7/mkspecs/android-g++ -I../Qt5TestTwo -I/opt/Qt-And/Qt5.1.0/5.1.0/android_armv7/include -I/opt/Qt-And/Qt5.1.0/5.1.0/android_armv7/include/QtWidgets -I/opt/Qt-And/Qt5.1.0/5.1.0/android_armv7/include/QtGui -I/opt/Qt-And/Qt5.1.0/5.1.0/android_armv7/include/QtCore -I. -I. -I../../../Qt5-Android-deps/Android-ndk/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I../../../Qt5-Android-deps/Android-ndk/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi-v7a/include -I../../../Qt5-Android-deps/Android-ndk/android-ndk-r8e/platforms/android-14/arch-arm/usr/include -I. -o main.o ../Qt5TestTwo/main.cpp
    P.s: ignore the strikeouts

  • Moderators

    You can use code tags to avoid strikeouts

    I have introduced the code tags for you.

  • Ive googled your issue: cannot locate '__aeabi_ldiv0'...
    Not really satisfying: https://github.com/paddybyers/anode/issues/12
    You dont have another device to test it?

  • Moderators

    hmm. I also tested it on my HTC Desire V android version 4.0.3. The same problem occurs.
    Moster, are you using the latest officially release Qt 5.1 for Android ?
    Because i have been using Necessitas which uses qt4.x previously and the Apk built used get deployed with no issues on both devices.
    Can you upload a sample .apk built using your toolchain ?

  • I can of course do that, but the problem seems to be ICS (api level 15), since the same error occurs on the emulator. It does not happen with other api levels.

    here is some test apk https://mega.co.nz/#!pp8EQCiI!TgGvuE7BL4LaLar9jkwYaivEP04FKO6lrtUS6t6s3d4

    It has some buttons on it

  • Moderators

    Ok. I have even downloaded the API level 10 which is for ICS 4.0.3 and also compiled against it.

  • I mean, its android 4.0.3 itself (api 15) that causes this error. Api 10 is android 2.3.3 (gingerbread). There seems to be some library or whatever on 4.0.3 that fails while loading the qt5 libs

  • Moderators

    Moster, Your Apk worked on my device. 3 Buttons and 2 radiobuttons.
    Well now can you just post exact details related to Qt.

    1. Qt version
    2. Android NDK version (Possibly provide exact download link)
    3. Android SDK version (Possibly provide exact download link)
    4. Open JDK version
    5. Ant tool version
    6. Package Configuration > Android Target SDK
    7. Deploy Configuration
    8. Android Kits as seen in "Build & run" > Kits
    9. Qt Versions as seen in "Build & run" > Qt Versions

    It would be very very helpful.
    Thanks in advance.

    1. Qt 5.1 release
    2. ndk-r8e http://developer.android.com/tools/sdk/ndk/index.html (x86_x64 version since Im using ubuntu x64)
    3. 22 from here http://dl.google.com/android/android-sdk_r22.0.1-linux.tgz
    4. OpenJDK 6 for amd64
    5. Ant 1.8.2 http://i.imgur.com/scmwd8B.png
    6. Target SDK is 10
    7. Use Qt libraries from device and Use local Qt libraries (like you)
    8. Android for arm (GCC 4.7, Qt 5.1.0)
    9. Qt 5.1.0 for Android armv7

  • Moderators

    The changes that are on my side is that i'm using 32 bit ubuntu 12.10 and Ant 1.9 . I don't know whether it is causing the problem. Also i tried with Open JDK 7 but no success.


  • I can only test it on the android emulator with ICS(4.0.3).
    But it seems to be GCC 4.4.3, with 4.6 and 4.7 it works

  • Moderators

    Well thanks for all your support, ill now try with 64 bit ubuntu.

  • I was getting the same error as you, and I was using the same Qt details to compile with.

    I am no longer getting this error after switching from 4.4.3 to 4.7.

  • That's what I also said in my latest post. I guess he didnt try it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.