Changes between Version 28 and Version 29 of PyOtherSideForAndroid

Nov 16, 2014, 12:13:46 AM (7 years ago)
Martin Kolman



  • PyOtherSideForAndroid

    v28 v29  
    2323For build script integration it would be nice to be able to non-interactively build a Python application package for Android, without the need to do that manually in the !QtCreator GUI.
    25 Fortunately the [ '''androiddeployqt'''] tools seems to do just that. :)
     25Fortunately the [ '''androiddeployqt'''] tool seems to do just that. :)
    2727==== Using androiddeployqt ====
     29The '''androiddeployqt''' makes it possible to create android packages (APK) for Qt applications from the command line.
     31But before you can start using it, you need to export paths to your Android NDK & SDK as environmental variables so that the tools can find them:
     34export ANDROID_NDK_ROOT=<path to Android NDK top level folder>
     35export ANDROID_SDK_ROOT=<path to Android SDK top level folder>
     38Note that the NDK should preferably be the same one that has been used for your Python 3 for Android build.
     40Next you need to run ''qmake'' & ''make'' in your project directory to prepare it for '''androiddeployqt'''.
     42Note that you should use the ''qmake'' that from your Qt for Android SDK, not the system-wide ''qmake'', so that any platform dependent code (C++ launcher, etc.) in your project is correctly compiled for Android. For example for the Qt 5.3 Android SDK on Linux installed in ''/opt'' this "android qmake" is in {{{/opt/Qt5.3/5.3/android_armv7/bin/qmake}}}.
     46make install INSTALL_ROOT=android-build/
     49Next run the tool to create an APK:
     52androiddeployqt --output android-build/ --verbose
     55This is just a basic usage example, the tool can do much more such as deploying the APK to device, signing the AKC, using a different Qt library deploy methods, etc.