SSL libraries in Qt for Android
Add SSL libraries in Qt project for Android with a multi-abi kit.

04/03/2021

This article explains how to import correctly the ssl libraries in Qt for Android with a multi-abi kit.
In my project the supported achitectures are armeabi-v7a and arm64-v8a, but the code below is working with all achitectures supported by Android.
Normally when I needed to import different libraries for a specific architecture I used something like this:
In my experience with a multi-abi kit this solution doesn’t work properly and 32 bit libraries are not included correctly in the final build.
The solution is simple, based on the ANDROID_ABIS that declares the achitectures supported in the .pro file of you project.
The inclusion of the libraries must be done by cycling the supported abis and including the specific libraries for each target architecture.
As you can guess, the important thing is to name the library folders with the correct name of each specific architecture.
The alternative solution is by making a specific compilation for each specific abi, but this way takes longer and it is less convenient.
The libraries are available from this link:
https://github.com/KDAB/android_openssl
Download the project and choose the proper libraries depending on the Qt version you are using.