New


Official instructions

- http://qt-project.org/doc/qtcreator-3.0/creator-developing-android.html

- http://qt-project.org/doc/qtcreator-3.0/creator-deploying-android.html


Tutorial

http://doc-snapshot.qt-project.org/qtcreator-2.8/creator-android-app-tutorial.html#adding-an-svg-image


Download Qt for Android

- simply install all the Android packages for your Qt version


Install Apache Ant 1.8.0 or later


Download the SDK and the NDK

- http://developer.android.com/sdk/index.html

- http://developer.android.com/tools/sdk/ndk/index.html


Unzip/untar in your home


sudo mv android-ndk-r9c /opt/

cd /opt/

sudo mkdir android

cd android

sudo ln -s /opt/android-ndk-r9c ndk


Update the SDK and install the packages for 4.0

- cd ~/adt-bundle-linux-x86_64-20131030/sdk/tools ; ./android update sdk


Add this for Linux

vi /etc/ld.so.conf.d/androidGL.conf

# Android SDK libs

/home/roberto/adt-bundle-linux-x86_64-20131030/sdk/tools/lib

sudo ldconfig

See: http://stackoverflow.com/questions/11902685/emulator-not-running



Run emulator manually on Linux

cd ~/adt-bundle-linux-x86_64-20131030/sdk/tools

./emulator-arm -avd TestDuos


Bug with QtCreator 3.0


The newest version of the NDK assign default/armeabi-v7a architecture instead of simply armeabi-v7a, so the Creator cannot find a suitable device for deploying among the AVD.


Here's a workaround:


1. In QtCreator -> Projects -> BuildEnvironment add the variable

ANDROID_TARGET_ARCH=default/armeabi-v7a


2. in the shell type

cd /opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/

ln -s . default


If this doesn't work, the only solution is to download an older version of the NDK:

http://ady.my/viewer/tool.html