Semyon Tikhonenko
Semyon Tikhonenko

Reputation: 4262

Can't build Qt Application for Android for arm64-v8a, libc++.so.16 not found error is shown

When I try to build Qt app for Android for arm64-v8a device it shows me :-1: error: no such file or directory: '/Users/semyontikhonenko/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++.so.16' When I try any other platform it's built successfully. I tried a workground from https://wiki.qt.io/Qt_for_Android_known_issues but it didn't help. This is how I did it: enter image description here

Upvotes: 0

Views: 1381

Answers (1)

dtech
dtech

Reputation: 49319

It keeps on searching for libc++.so.16 even if the env var is set to 21. And even if you copy and rename a file so it can match, that only leads to a cascade of other errors.

The version it tries to find doesn't seem to be tied to that env var, but to the project minimum API requirement setting.

For me it works if I set the env var to android-28, and then set the project minimum required SDK to API 21. Generate a manifest template if you haven't, and edit that setting and it should work.

Lower minimum APIs don't seem to work with v8a. That makes sense, because 64bit android was introduced with version 5, which is API 21. Which also means you are not losing potential targets, as older versions don't support 64 bit binaries anyway.

So if you want to target the 7-8% of market share between the Qt minimum requirement and API 21, you will have to use a v7a binary. v8 is backward compatible with v7 tho, so you can use the v7a binary even on new android versions. Google will begin mandating 64bit binaries in August 2019, so for the time being, there isn't much point in using v8a, unless you have an app that is supposed to address more than 4 gigs of memory, which is about twice the average total ram of phones sold this year. You can get away with a single binary that will work on all devices, which is not the case for v8a, which won't work on 32bit SOCs, even if the android version is 5 or above.

Upvotes: 1

Related Questions