Are Qt 5.1 working on android?

1,186 views
Skip to first unread message

Marco Scarpetta

unread,
May 4, 2013, 2:54:15 AM5/4/13
to andro...@googlegroups.com
Hello to all!
I'm trying to run Qt 5.1 on android. I'm on ubuntu 12.04 64bit.
I've successfully built Qt from git following the official guide, and I'm using the pre-built qt-creator 2.7.1 from here and I've configured it following the build guide.
I've tried running an hello-world program on the virtual device, but it doesn't work. Have I missed something or Qt doesn't still work on android?

Marco Scarpetta

unread,
May 10, 2013, 8:19:23 AM5/10/13
to andro...@googlegroups.com
This is what I get when I deploy it to my phone:


Starting remote process.D/dalvikvm(12018): DexOpt: --- END 'QtAndroid.jar' (success) ---

D/dalvikvm(12018): DEX prep '/data/local/tmp/qt/jar/QtAndroid.jar': unzip in 3ms, rewrite 340ms

D/dalvikvm(12018): Trying to load lib /data/local/tmp/qt/lib/libgnustl_shared.so 0x40d2e8a0

D/dalvikvm(12018): Added shared lib /data/local/tmp/qt/lib/libgnustl_shared.so 0x40d2e8a0

D/dalvikvm(12018): No JNI_OnLoad found in /data/local/tmp/qt/lib/libgnustl_shared.so 0x40d2e8a0, skipping init

D/dalvikvm(12018): Trying to load lib /data/local/tmp/qt/lib/libQt5Core.so 0x40d2e8a0

F/libc (12018): Fatal signal 4 (SIGILL) at 0x4bff9238 (code=1), thread 12018 (ample.untitled1)



'org.qtproject.example.untitled1' died.

Marco Scarpetta

unread,
May 13, 2013, 10:08:23 AM5/13/13
to andro...@googlegroups.com
Solved!
I was building qt5 for armv7, while my mobile is armv6. I've built it for armv5 (ANDROID_TARGET_ARCH=armeabi make) and now it works. Great job!

Massimo Belgrano

unread,
May 14, 2013, 2:34:55 AM5/14/13
to andro...@googlegroups.com
Can you post your script?

Marco Scarpetta

unread,
May 14, 2013, 6:36:43 AM5/14/13
to andro...@googlegroups.com
These are the steps I followed:

git clone git://gitorious.org/qt/qt5.git qt5

cd qt5

perl init-repository

./configure -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk <path/to/ndk> -android-sdk <path/to/sdk> -android-ndk-host <e.g. linux-x86_64> -skip qttools -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples

ANDROID_TARGET_ARCH=armeabi make

Marco Scarpetta

unread,
May 14, 2013, 7:21:58 AM5/14/13
to andro...@googlegroups.com
However you can also download the builds here (qt-creator is included), but them are for armv7.

Luciano Martins

unread,
Nov 27, 2013, 11:34:54 AM11/27/13
to andro...@googlegroups.com
Grande Marcão...
Por onde andas meu amigo ?

Abraço.
Reply all
Reply to author
Forward
0 new messages