Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Pyqtdeploy and android
I want to deploy my Python 3.4 PyQt 5.3 application to android via pyqtdeploy and Qt5.3 for Android. I've already install all prereqs (SDK, NDK, Ant, etc.) and successfuly deploy testing Qt project with button and label to my android device, but it's just simple Qt c++ project.
I made Qt project from PyQt application (also testing and simple) with pyqtdeploy and trying to deploy it as before, but linker told me, that there is no QtCore, QtWidgets libraries. As I see, it's mean, that I must build PyQt (and Python?) as static library for arm(?) and say to linker where they are. But how can I do this? Is it possible to make such libraries from sources in Qt, or I need another enviroment.
Or everything is bad, and it's wrong way?
pyqtdeploy intro page said, that pyqt application can be deployed to android, but documentation only tells about desktop variant, and tells: "For mobile platforms this will be considerably more complicated".
Why there is no prebuilted arm static libraries on official sites? And is it a good idea or waste of time?
Hi and welcome to devnet,
Sounds like you want to do PyQt on Android ?
I tried kivy with buildozer, but buildozer still not Python 3 ready. I've spend hours to fix sources of buildozer and finally I made apk and deploy application, but it's really annoying. Couple days ago I read about pyqtdeploy on riverbank site. "God news!", — i thought. "Deploying my favorite pyqt on android? Are you kidding me?! Awesome!"
So, just now I tried to build console application (print("hello!")) with pyqtdeploy and Qt for Android. There is two perspectives: android and desktop. First I tried desktop, and it builds just fine, but there was some runtime errors, missing libraries, I think. Then I tried andoid, and it didn't build. Cause python.h have #include <io.h>, which, probably, missing in android qt enviroment. I don't know really know should I do it this or that way, sadly.
Tomorrow I will write some mail to pyqt support, it's really unfair to write "It supports deployment to desktop platforms (Linux, Windows and OS/X) and to mobile platforms (iOS, Android and Windows RT)." and don't write how to do it. Huh…
Probably someone tried and have success here or have any ideas?
bootchk last edited by
pyqtdeploy v0.5 has more support for cross compiling to android and ios. It does require cross compiling several packages, static. The change from the previous version 0.4 is that pyqtdeploy (invoked on a command line) now generates the .pro projects and qmake files to accomplish that static cross compiling of packages (as well as what it did in the previous version, which is let you use a GUI to build your PyQt app.)
pyqtdeploy is still in active development, so it is not foolproof.
"instructions for cross-compiling static packages":http://pyqt.sourceforge.net/Docs/pyqtdeploy/static_builds.html
Yeah, I've tryed it out couple days ago. Nohting new, I've tryed to build python as static library for android, but qmake doesn't work with generated .pro file. It's telling me that something "includes" in python source, that can't be found in arm gcc library. Anyway I hope that pyqt guys will do downloads for static arm build of current versions of python, pyqt and all other prereqs. God damn! Make a VM with linux, where everything already installed and ready to use pyqtdeploy. It's really easiest way to deploy.