Qt 5.12 (Beta) + Android (Clang) = App Crash
-
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?
-
According to QTBUG-67464 and Markus' comment here, clang should be now fully supported.
-
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
-
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/