APK without device
-
Hello, I'm working on an Android app with Qt 5.2.1/5.3.0 and I've noticed that, to build an APK from Qt Creator I need a device connected to the PC or an Android Emulator instance working.
Since often I need to simply compile and package a new APK but I don't have an Android device with me and the emulator is very heavy, is there an way to manually build an APK starting from souce code. For example invoking qmake and make from command line?
-
Hi,
You can use the androiddeployqt tool which is shipped with Qt.
You can run it from command line with proper inputs to create the APK.
More info "here":http://blog.qt.digia.com/blog/2013/10/09/android-deployment-in-qt-5-2/ and its options "here":http://doc-snapshot.qt-project.org/qt5-stable/deployment-android.html#androiddeployqt.So basically a typical commandline statement would be,
@
/opt/Qt5.3.0/5.3/android_armv7/bin/androiddeployqt --output android-build/ --input android-libDeployTest.so-deployment-settings.json --ant /opt/ant-1.9.3/bin/ant
@
Full path for androiddeployqt tool if it is not in path. -
Thanks, I'll try it!