When I tried to deploy an Qt 5.13 app to Android recently, it gives out multiple errors.

1. Solve the “-lc++” Error

If you are using the Android ndk r20 or later, the stdlib++ is linked by default. You can solve it by simply adding the following line into the .pro file.

2. Solve the “androiddeployqt exited with code 14” Error

When I tried to compile the Android apk for the Qt app. The arm64 compilation goes through without problem, but for armeabi_v7a version it gives out the following error:

Looking deeper into the compilation log, it is complaining about

The problem is that this merged AndroidManifest.xml file is generated by Qt itself. To overwrite it with the correct version, here is the solution: go to the build step for Android APK and “Create Template”.

After save the template in a specified location (eg. app/android), it will also automatically update the .pro file with the ANDROID_PACKAGE_SOURCE_DIR pointing to the saved template.

Note: the Android build SDK version (or API) is not critical here, whether you are using android-21, 26 or 28, it doesn’t matter.

How to Fix Few Issues when compiling Qt 5.13 for Android

Please tell us what's in your mind ...

%d bloggers like this: