Ooops I should have added that I don't actually have any Android HW other than the OS7 Galaxy Tab S2 mentioned... all the other testing has been via AWS's "Device Farm" which lets you upload an apk and interact with it (or automated fuzz-test it) and capture videos/screenshots/logs... but not actually debug it!
Have been away from this issue for a couple of weeks but about to start looking at it again. Might indeed be easiest to just get hold of some more recent Android HW though!
You can try compiling QtOpcua module using your Qt 5.6 toolkit and toolchain. If that works, then you should be able to deploy it to your device and use it in your project. If it does not work, then find a different board ;-) Or perhaps use linuxdeployqt to create a self-contained package that will shich Qt together with it. I have no idea if this will work on an embedded device - it's definitely not a standard use of this tool.
@SachinBhat If your app crashes in release mode even in QtCreator you should first find out why before deploying.
One reason could be that it tries to load debug libs.
Another one can be a bug in your code which does not cause a crash in debug mode but in release mode.
Nothing really serious comes to my mind, and I have worked on many desktop and mobile apps in QML.
Just some general remarks, then:
mobile UI often makes little sense on desktop. It looks weird, very different from other desktop apps, and very often does not take advantage of large screen space. Having separate UI for desktop and mobile (or phone and tabler+desktop) is often a good idea
when on desktop, add scrollbars :-) On phones people know that lists are flickable. On desktops, it is not immediately obvious to many people, that a list can be scrolled
remember that notifications are far less noticeable on desktops (just a small balloon in the corner of a screen, and it disappears quickly) than on mobiles (persistent entry in notification "log")
remember about keyboard ;-) On desktops it is very useful to have keyboard focus, proper tab order etc.
I have exactly the same problem with gui not showing on the target device (Raspberry Pi 4). I followed the same tutorial and apps compile on the Pi and I can run them by double-clicking or from terminal but not from Qt Creator directly. I found here to try setting the DISPLAY environment variable in the RUN configuration in Qt Creator. I did as the author of the thread but with no success. The app deploys and runs, I can see it in the processes list but doesn't show on the screen. Has anyone found the solution for this?
I'm trying to build an application for the Nvidia Xavier.
I have not tried to build Qt from the source before. Is there any document available for building Qt for the NVIDIA Jetson Xavier platform?
Please guide me to build from the source. Thanks in advance.
I am currently having the same problem. This worked not too long ago though.
When QtCreator runs the androiddeployqt executable, the error is a different one: "Cannot find application binary libTestApp.so"
However, when I manually execute everything the way QtCreator does it (at least the way it shows it in [4 Compile Output]), I get the mentioned "No target architecture defined in json file" error.
You just need to Go to GCP, find your project, find Google Android Developer API and change the version there. Or you can just disable the API if you don't use it. For example, my GCP project was automatically named Google Play Android Developer so yours might probably be the same.
I can't see an option on my console probably because they removed it for new projects, but if your project is already using an old version, you probably will have a warning there as well.
you can visit here for full details https://stackoverflow.com/questions/56700332/what-is-we-ve-detected-that-your-app-is-using-an-old-version-of-the-google-play
Did you check whether cpputest has a runner for Qt ?
In any case, if you have so much trouble running Qt tests, the I would recommand using the QtTest framework as it will handle all Qt related features to test your GUI.
Here is my solution:
I have created a new app from the template of Qt Creator and compared it with the example project for Qt Android:
I conclude, that I have to modify the .pro file. First of all I had to add the following line:
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
Then I had to replace DISTFILES, that is automatically added by Qt Creator, if I create a Java class:
OTHER_FILES += \
Finally I had to edit the AndroidManifest.xml, that I have copied from the exmaple project, in the text editor mode:
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="com.hello.android.Backend" android:label="Hello Android" android:screenOrientation="unspecified">
The last step was not necessary in the project of my initial question.
I found a workaround by myself. Actually the problem lies in the multilanguage feature, which needs some Qt tools for configuring it correctly with cmake. One Workaround is just install one binary of Qt 5.14.0 e.g. msvc2017 32 bit and assigne CMAKE_PREFIX_PATH to the location where the missing cmake file is located e.g. CMAKE_PREFIX_PATH:INTERNAL=C:\Qt\5.14.0\msvc2017\lib\cmake\Qt5. After that, cmake is then running to the end giving some warnings, but this can be ignored and all demos can be build and flashed on the target board.