Android – An error occurred while deploying Qt on the Android app

An error occurred while deploying Qt on the Android app… here is a solution to the problem.

An error occurred while deploying Qt on the Android app

I

was trying to run my first Qt Android app and I followed this tutorial:

http://urfoex.blogspot.ro/2013/12/qt5-android-setting-up-qt-52-for-android.html

However, after I ran it, I got this error :

i686-linux-android-g++: error: unrecognized command line option '-marm' make: *** 
[main.o] Error 1 21:33:42: The process "make" exited with code 2.
Error while building/deploying project avd_tests (kit: Android for x86 (GCC 4.8, Qt 5.2.1)) When executing step 'Make'

I

also tried using armeabi but I got :

In file included from .. /.android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/include/algorithm:60:0,
                 from .. /. Qt5.2.1/5.2.1/android_armv7/include/QtCore/qglobal.h:82,
                 from .. /. Qt5.2.1/5.2.1/android_armv7/include/QtCore/qcoreapplication.h:45,
                 from .. /. Qt5.2.1/5.2.1/android_armv7/include/QtWidgets/qapplication.h:45,
                 from .. /. Qt5.2.1/5.2.1/android_armv7/include/QtWidgets/QApplication:1,
                 from .. /avd_tests/qtquick2controlsapplicationviewer/qtquick2controlsapplicationviewer.h:13,
                 from .. /avd_tests/main.cpp:1: .. /.android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/include/utility:68:28: fatal error: bits/c++config.h: No such file or directory  #include <bits/c++config.h>
                            ^ compilation terminated. make: *** [main.o] Error 1 21:44:14: The process "make" exited with code 2. Error while building/deploying project avd_tests (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1)) When executing step 'Make'

The app I’m building is the default Qt Quick app. I’m using Qt 5.2.1 and QtCreator 3.0.1.

Anyone know what it could be, or is there a good guide to anyone who knows how to make Qt on Android to run on GNU/Linux?

Solution

It turns out that this is a known bug in the new version of the Android SDK

As Bogdan Vatra, creator of Qt for Android, the solution is:

  • Look for older Android SDKs.
  • Upgrade your Qt creator (using Qt SDK 5.3).
  • Use real equipment.

To fix the problem, I downloaded qt-opensource-linux-x64-android-5.3.0-RC_2014-04-14_00-48-35-55.run from http://download.qt-project.org/snapshots/qt/5.3/5.3.0-RC/2014-04-14_55/ Deployment successful!

Thank you Bogdan!

Related Problems and Solutions