Cannot build any Qt application on Android with QT 6.5
-
Description
Windows 11
QT Creator 12.0.2
Device : Google Pixel 6 Pro
Android : 9Error : App crashes immediately after launch.
I ple.andddddddd: Late-enabling -Xcheck:jni W ple.andddddddd: Unexpected CPU variant for X86 using defaults: x86 W System : ClassLoader referenced unknown path: W ple.andddddddd: Accessing hidden method Landroid/content/ContextWrapper;->getDisplay()Landroid/view/Display; (light greylist, linking) D OpenGLRenderer: HWUI GL Pipeline E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread E AndroidRuntime: Process: org.qtproject.example.anddddddddd, PID: 4347 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/org.qtproject.example.anddddddddd-U6018tN9aFQyu3Mkmv78UQ==/lib/x86/libQt6Core_x86.so"... E AndroidRuntime: at java.lang.Runtime.load0(Runtime.java:928) E AndroidRuntime: at java.lang.System.load(System.java:1633) E AndroidRuntime: at org.qtproject.qt.android.QtNative$2.run(QtNative.java:229) E AndroidRuntime: at org.qtproject.qt.android.QtThread$2.run(QtThread.java:51) E AndroidRuntime: at org.qtproject.qt.android.QtThread$1.run(QtThread.java:25) E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
I dont know why my Application cant work in AVD, Immediately crash after open it, it have android 9 using 26 NDK and JDK 19 and build with x86
i already searching info like in https://bugreports.qt.io/browse/QTBUG-119059 but that not work, any idea ?
its just a simple program who give some label and push button
-
@Patar said in Cannot build any Qt application on Android with QT 6.5:
Device : Google Pixel 6 Pro
This device is an ARM device, not x86
-
OK, emulator device is indeed x86.
You could try with the latest Qt6 release to see whether it works.
I'm not sure about this part: /lib/x86/libQt6Core_x86.so Can you show your Qt configuration for Android in the Kit you're using? -
@jsulm i dont really know the kit one, i just do automatic, but here it is
here is the configuration, i try to change the NDK to 26 but somehow it never saved and make error (the clone one), but the compiler one is red (idk why that happen)
but in build environment its NDK 26
-
This is not what I asked.
The Kit you're using is selected on the left bottom side. Please check the name of that Kit and then got to the settings and there Kit tab - select the Kit you're currently using and check what Qt version is set in this Kit. Then go to "Qt Versions" tab and select that Qt version.
It looks like you're using Qt 6.5 for Android, but it would be still good to see whether there are any warning in that Qt version. -
What about checking the Qt version in "Qt Versions" tab?
-
Yes. Also looks good.
You could try with more recent Qt6 version. -
@jsulm said in Cannot build any Qt application on Android with QT 6.5:
Qt6 version.
what do you think the problem in here ? is it my version didn't up to date or something wrong with NDK, SDK or JDK
because my friend doing OK with 5.15 version but idk why i cant do it in 5.15 and 6.5but thank you so much, i will update it to newest one, hope it will solve it
-
I don't know what the problem is. You can compare your setup (SDK version, NDK version, JDK version, ...) to the setup your friend has.
-