[PyQt] PyQt5 and Android
Phil Thompson
phil at riverbankcomputing.com
Tue Mar 1 09:21:24 GMT 2016
On 1 Mar 2016, at 9:04 am, Jakob Simon-Gaarde <jakobsg at gmail.com> wrote:
>
> Hi.
>
> I am can see in the ducumentation for PyQt5 that mobile devices using Android or iOS operating systems are supported. I wanted to give this a try, but I am stuck cause I can't find a guide on how to get started.
>
> I am using Kubuntu (latest version as I write: 15.10)
> Here is what I have done until now:
>
> Preparations:
> ------------
> * Installed Qt 5.5.1 (with Android libraries)
> * Installed Android SDK and NDK
> * Installed python-dev and python3-dev
> * Downloaded, unpacked, build and installed sip-4.17.tar.gz for both python2.7 and python3.4
> * Downloaded and unpacked PyQt-gpl-5.5.1.tar.gz
>
> Host system build:
> -----------------
> First I tried to build the host system version of PyQt5:
>
> python configure.py -q <PATH_TO_GCC_QMAKE>
>
> This worked fine.
>
> Android build:
> -------------
> ANDROID_NDK_ROOT=<MY_NDK_INSTALLATION> python configure.py -q <PATH_TO_ANDROID_QMAKE>
>
> Querying qmake about your Qt installation...
> Determining the details of your Qt installation...
> /home/jakob/Qt/5.5/android_armv7/bin/qmake -o qtdetail.mk qtdetail.pro
> make -f qtdetail.mk
> /home/jakob/dev/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/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 -fno-builtin-memmove -std=c++11 -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../../Qt/5.5/android_armv7/include -I../../../Qt/5.5/android_armv7/include/QtCore -I. -I../../android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -I../../android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I../../android/android-ndk-r10e/platforms/android-9/arch-arm/usr/include -I../../../Qt/5.5/android_armv7/mkspecs/android-g++ -o qtdetail.o qtdetail.cpp
> /home/jakob/dev/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/jakob/dev/android/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libqtdetail.so -Wl,-rpath=/home/jakob/Qt/5.5/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libqtdetail.so qtdetail.o -L/home/jakob/dev/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -L/home/jakob/dev/android/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/jakob/Qt/5.5/android_armv7/lib -lQt5Core -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
> Error: Failed to determine the detail of your Qt installation. Try again using
> the --verbose flag to see more detail about the problem.
>
> So this is where I am stuck...
>
> What am I doing wrong?
>
> It would be really nice if someone could write a guide on how to get started with PyQt5 on Android and iOS.
Mobile support is only in the context of pyqtdeploy'ed applications. See the pyqtdeploy documentation for cross-compiling for those platforms.
Phil
More information about the PyQt
mailing list