Qt 5.12 (Beta) + Android (Clang) = App Crash
-
wrote on 9 Oct 2018, 10:57 last edited by
I'm really glad that Qt 5.12 will (finally) supports Clang toolchain for Android targets. Trying current beta version, compilation on my Windows 10 machine goes smoothly as silk, however deployed apps ingloriously crash with the following error.
E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread E AndroidRuntime: Process: org.qtproject.example.mousearea, PID: 25359 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address"
Same result with different configurations:
- SDK version: 26.1.1 (latest)
- NDKs: 10e,15c, 16b, 17c
- android APIs: 22, 23, 27, 28
- different target devices (phones)
Any ideas?
-
I'm really glad that Qt 5.12 will (finally) supports Clang toolchain for Android targets. Trying current beta version, compilation on my Windows 10 machine goes smoothly as silk, however deployed apps ingloriously crash with the following error.
E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread E AndroidRuntime: Process: org.qtproject.example.mousearea, PID: 25359 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address"
Same result with different configurations:
- SDK version: 26.1.1 (latest)
- NDKs: 10e,15c, 16b, 17c
- android APIs: 22, 23, 27, 28
- different target devices (phones)
Any ideas?
-
If I understand correctly, my Qt is > 5.9, therefore SDK tools > 25.2.5 should be fine .
wrote on 9 Oct 2018, 13:03 last edited by -
wrote on 9 Oct 2018, 13:11 last edited by
@Pablo-J-Rogina
According to QTBUG-67464 and Markus' comment here, clang should be now fully supported.
-
@Pablo-J-Rogina
According to QTBUG-67464 and Markus' comment here, clang should be now fully supported.
wrote on 9 Oct 2018, 13:27 last edited byDid you check already on google's qt on android group?
-
wrote on 11 Oct 2018, 12:13 last edited by
I finally managed to fix the problem. App doesn't crash when compiled with NDK16b!
- install Android Studio (if not already installed)
- download NDK16b and extract it to any location (in my case 'D:\sdk\android-ndk-r16b')
- start Qt Creator
- select menu Tools > Options > Devices, tab Android
- set proper android SDK paths:
- click OK
- open your project (.pro)
- Important! Delete folder containing previous (shadow) build (see path under 'Build directory'):
- under Projects (left bar) > Build & Run, activate Android configuration
- compile & run
-
I finally managed to fix the problem. App doesn't crash when compiled with NDK16b!
- install Android Studio (if not already installed)
- download NDK16b and extract it to any location (in my case 'D:\sdk\android-ndk-r16b')
- start Qt Creator
- select menu Tools > Options > Devices, tab Android
- set proper android SDK paths:
- click OK
- open your project (.pro)
- Important! Delete folder containing previous (shadow) build (see path under 'Build directory'):
- under Projects (left bar) > Build & Run, activate Android configuration
- compile & run
-
wrote on 16 Dec 2018, 03:55 last edited by
hello,
I've got the similar problem when changing the Qt from 5.11.1 to 5.12.0
It seems like crashed when the Android App start openning.
After some tracing, I finally found that, the reason is, the App hasn't got the permissions of reading&writing local extra storage. After I add the according permissions mannualy (in system management) , the App runs OK.
The 'permission' also can be added by this way below:
http://amin-ahmadi.com/2015/11/29/how-to-add-permissions-to-your-qt-android-app/ -
wrote on 18 Dec 2018, 10:35 last edited by DabullaThis post is deleted!