Necessitas QT - installing shared QT libraries on a device - android

I have a reasonably large Qt project which I don't want to rewrite in Java for Android. So I downloaded and installed Necessitas SDK and managed to compile the project as an apk file.
So far so good. It also executed successfully in emulator, but then I got stuck. First problem was that Necessitas Qt Creator always produces a "Debug" apk file, even though I set the project config to "Release". The second problem, it allows me to deploy the app to emulator only, but I want to install and test it on a real Android device.
How can I find and copy the necessary Qt libraries manually to the device?

Install Ministro from the Market to get the Qt libraries. Your app will dialog with Ministro to get the needed libraries from the net. See the How to write Qt apps for Android guides for more information.
Necessitas is still alpha, so the libraries are indeed debug ones (to get debug messages), but stripped of the symbols.

Related

Android/Boost.log application crashes at startup

I am trying to integrate Boost.Log in a QT/QML project that has to work on Windows, Linux and Android. While Win32 and Linux versions work like a charm, Android is giving me a few headaches.
I was able to build Boost library following instructions at https://github.com/moritz-wundke/Boost-for-Android.
However,
If I link my application statically to boost libraries, I get a bunch of linker errors, complaining that symbols are not found. Error messages are like: "error: undefined reference to 'boost::log::v2_mt_posix::core::get()', I get ~60 of them and I checked many times the file paths
If I link dynamically to boost, I can successfully generate my APK (the relevant .so files are included) but it crashes upon startup, both on a real device and on Android emulator
I'm new to Android development so it's entirely possible that I'm missing some key step here and I'm not really sure on what information may be relevant to provide here. Hope that someone can help.
I tried building with both ndk 20 and 21, Boost 1.70, Android SDK 26.
I plan to use QT 5.12 but did not add any QT code yet. I used QT Creator 4.10.2 (Windows) and 4.11.1 (Linux)

Qt Creator 5.8 Android Development NDK x64 bit error "No Rule to make target.."

So I've been using Qt Creator for quite sometime now, but I wanted to try out their development for Android devices (Usually use Android Studio). Main reason is because I prefer C++.
I created a simple Qt Quick application, and can't even get it to run. I made no changes to the program whatsoever. It recognized my device, and I have Android SDK, NDK, and ANT set up properly (from the Qt official page).
The error I'm getting is a pretty popular one, yet so far I've seen no solutions for it.
The error reads "mingw32-make:No rule to make target'......\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stlgnu-ibstdc++\4.9\include\profile\impl\profiler_map_to_unordered_map.h', needed by 'main.obj'. Stop."
Debugging is enabled on my device, everything is set up properly, device is being recognized, yet I have NO idea why I'm getting this error.
Any help would be much appreciated. It's infuriating.
SOLVED FOR THIS PROBLEM.
When using Qt Creator, no matter what version, on a windows computer the file path is the key to this problem. The length of the path.
Extracting the NDK folder and putting that folder DIRECTLY in the C:\ drive will make this build without any problems.
Leaving it in the downloads folder makes the file path TOO long for Qt Creator, hence it wont build.

Qt Creator Android Debugging - cannot see variables

I have upgraded to Qt5.5 from 5.1.1. Since then, when I create a stock project on android and run a debug build - which is physically deployed to an android device - I cannot see any variables in the watch view.
This is without even using a shared library.
Debugging and showing variables used to function correctly before I moved to Qt5.5. Given that my android environment and dependencies (ant, ndk, etc) have not changed, I suspect this is something to do with either Qt or the configuration of it.
Note that: show solib-search-path does include the path to my debug binary/object files. I was hoping Qt would shield me from a lot of the issues with native C++ on Android, but that has not been the case. How do I fix this issue? Is there an easy way to debug shared libraries (my own or others) that are loaded via dlopen()?

Deploying PyQt5 application to Android via pyqtdeploy and Qt5

Is it possible? I mean, yeah, pyqtdeploy intro page said: "pyqtdeploy is a tool for deploying PyQt applications. It supports deployment to desktop platforms (Linux, Windows and OS/X) and to mobile platforms (iOS, Android and Windows RT)."
I've installed Qt 5.3.0 for Android and all it's prerequisites (SDK, NDK, etc.). Also I made test project with simple button and label in QtCreator for testing deployment. Everything is fine. Next step was trying pyqtdeploy for making Qt project, pretty simple. But when I'm trying to build this project, linker said that there is no QtCore, QtWidget libraries. As I can recognize it, I've no static-linked PyQt libraries and that they must be compiled for arm architecture. Is it right? But then I've realised, that python library itself also must be arm compiled. And can I build this libraries from source in Qt?
Search did nothing. If this is true, why no one (riverbank, python) have no compiled libraries for arm?
Maybe I'm missunderstood something. In this case I got more global question.
How to deploy PyQt5.3 Python 3.4 application to Android with pyqtdeploy and Qt 5.3.0 for Android?
Wait for the next release of pyqtdeploy, which will probably give better instructions or include cross-compiled libraries. The pyqtdeploy project is being actively developed. Yes, you can use it for Android now, but you are on your own for cross-compiling many static libraries.

Qt app on Android without Ministro

I want deploy app with Qt 4 or 5 libs (Core & GUI) in apk. Is it real? I use necessitas to create apps. google.com didn't help in this answer.
P.S.: sorry for my English, it's not my native language.
If you mean that you don't want to use Ministro, then it should be possible. The page below gives some directions how to:
http://community.kde.org/Necessitas/QuickStartDevelop
On March 1, 2013, the page above has the following:
Deploy Configurations
Also on the Run view you can set the Deploy Configurations, by selecting Details at the right hand side these are the different options you can choose between.
Use device's qt libs
Deploy local qt libs
Install Ministro system
The Use devices qt libs option depends also on the Use local qt libs option. When Use local qt libs is unchecked your application will need the Ministro package to run. However if Use local qt libs is checked, Qt Creator will pass special parameters to the application, forcing it to use Qt libraries from the /data/local/qt path on the device.
The Deploy local qt libs option makes Qt Creator deploy qt libs found in the Qt SDK chosen (e.g. android-lighthouse-4.8.0). This option is useful when you hack on the Qt framework to test it. This option automatically selects the Use local qt libs option. This option get automatically unchecked after Qt Creator pushes the Qt libs. This option can be checked every time you need to push your local Qt modifications.
Install Ministro system option installs the Ministro package (you must provide the apk yourself; download it from from here). It is useful when you try to test your application on Android Virtual Devices.
If you want to go with Ministro for the libraries, here are directions on how to get it set up:
https://play.google.com/store/apps/details?id=eu.licentia.necessitas.ministro
http://sourceforge.net/p/necessitas/home/necessitas/
What is Ministro ?
Necessitas is also the Home of Ministro, an Android application which provides a system wide downloader and installer of the LGPL Qt shared libraries. You can find Ministro on the Android Market or as direct download here.
EDIT: Some more links:
http://community.kde.org/Necessitas
http://necessitas.kde.org/
http://qt-project.org/wiki/How_to_Create_and_Run_Qt_Application_for_Android
Hope that helps.

Categories

Resources