Android development on MacOS with Qt Creator 4.9.2?
-
@thanksforthehelp are you sure its a 64 bit x86 architecture?
Because as far as I know, those do not come precompiled, only the 32 bit one.
So you would have to build Qt yourself for that one.
-
From the looks of it on this website it seems as if Galaxy S10 and S10+ both have 64 bit processors. My guess is that I need x86_64 development for that. I can have x86 but wouldn't that be inefficient and sloppy?
-
@thanksforthehelp
please check your device settings to make sure :)
I can have x86 but wouldn't that be inefficient and sloppy?
32 bit apps run fine on 64 bit systems, in 90% of all cause you won't notice or measure a difference
-
@thanksforthehelp said in Android development on MacOS with Qt Creator 4.9.2?:
My guess is that I need x86_64 development for that
No, Galaxy S10 and S10+ have ARM CPUs, not x86.
As @J-Hilk shows you need ARM64-v8a -
Instruction Sets: arm64-v8a
Kernel Architecture: aarch64
CPU Architecture: ARMv8-ADoes that mean 32 bit? I sure as heck looks like 64 since it doesn't say 32
-
@thanksforthehelp CPU supports 64bit, but is able to execute 32bit as far as I know. Just like Windows/Linux on 64bit machines.
-
I know 64 bit computer are able to execute and run 32 bit programs. The issue, as far as I can understand, is that 32 bit programs tend to be a bit slower since they do not utilise the whole CPU or something. Even if the difference is, for example, 90% performance I do not want 32 bit build because I need and want as fast, secure and stable as possible.
-
@thanksforthehelp
well there you have it, select yourQt for Android ARM64-v8a
kit
and you should be good to go -
I managed to solve the initial error:
Initializing deployment to Android device/simulator Error while building/deploying project untitled (kit: Android for x86_64 (Clang Qt 5.13.0 for Android x86_64)) When executing step "Deploy to Android device"``` by opening Android Studio -> SDK Manger -> Tick Show Package Details -> Install Android 9.+ (Q) with Atom_64 -> apply -> install. Now when I compile a Google Pixel 2 XL pops up when I run but no app is created. There are errors in the 'Issues' tab:
:-1: error: error: cannot find -lc++
:-1: error: linker command failed with exit code 1 (use -v to see invocation) -
Selecting Qt for Android ARM64-v8a does not compile. There are no supported ABIs for that on my computer nor in the SDK manager...
Edit: Entering the AVD Manager and changing the architecture of my default phone emulator mirror/profile on other images ATM to nougat 25 for arm64-v8a target build android 7.1.1, despite me having android 9.0, lets try it out
-
ah @thanksforthehelp different error :) would have been good to know from the beginning x)
take a look here
https://forum.qt.io/topic/103713/error-cannot-find-lc-qt-5-12-androiderror comes from the ndk 20 despite what the docs says, that isn't quite without issues. But fixable, like the thread describes.
-
It is still trying to boot the first emulation on the new architecture. I get a warning though: "Running a x86 based AVD is 10x faster". It is still trying to boot it after 5 minutes...
-
@thanksforthehelp said in Android development on MacOS with Qt Creator 4.9.2?:
"Running a x86 based AVD is 10x faster"
Yes, for testing in VM on PC it is better to use x86 based AVD as it is way slower to emulate complete different CPU (ARM on x86).
-
@jsulm so I should deploy for x86 but then when I have my prototype complete I build it with arm? Should the final product, besides the binary files, work the same and be the same?
-
@thanksforthehelp Yes, exactly. But you should still test on a ARM based phone/emulator sometimes :-)
-
After switching to x86 and applying the fix to remove the new compiler errors mentioned above I get a fully running emulation of android. When does my program actually boot? Have selected android x86 project, stacked, but nothing happens after the phone boots up...
-
Never mind! The program starts after about 1 minute 30 seconds, I just have to wait without pressing the emulated screen/phone
-
i am getting this error
i am using,Qt Creator 4.11.2
Based on Qt 5.14.2 (Clang 10.0 (Apple), 64 bit)Built on Mar 27 2020 02:24:45
From revision 699407b4ba
Copyright 2008-2020 The Qt Company Ltd. All rights reserved.
The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Android Studio 3.6.2
please help
i am not able to create build for android in qt
thanks!!!!!