Announcement for Qt developers targeting Android 6.0

2827
3
08-12-2016 03:54 PM
Labels (1)
LucasDanzinger
Esri Frequent Contributor
0 3 2,827

Starting with Android 6 (marshmallow), Google has moved away from OpenSSL to their own SSL implementation called BoringSSL. This affects all Qt developers targeting Android 6 and later, as libssl.so and libcrypto.so are no longer available from Android, causing https requests to fail in Qt applications. The solution suggested at this time by The Qt Company is to compile these libraries and package them in the APK with the ANDROID_EXTRA_LIBS qmake variable. For example, you could build the two libraries from OpenSSL, copy them into your Android kit’s lib folder, and then add the following line to your project's *.pro file:


android {
    ANDROID_LIBS = $$dirname(QMAKE_QMAKE)/../lib
    
    ANDROID_EXTRA_LIBS += \
        $$ANDROID_LIBS/libssl.so \
        $$ANDROID_LIBS/libcrypto.so
} 

This suggestion is applicable to any Qt developer targeting Android 6, whether using ArcGIS Runtime for Qt or not. Therefore, if you are using ArcGIS Runtime SDK for Qt, this suggestion is applicable whether you are using 10.2.5, 10.2.6, or Quartz (which is currently in beta). See the Qt documentation for further details on how to build OpenSSL and integrate the binaries into your project. In addition, licensing requirements for OpenSSL can be reviewed at https://www.openssl.org/docs/faq.html#LEGAL1  and https://www.openssl.org/source/license.html.

3 Comments
About the Author
I'm a Geographer working in Product Development at Esri, focusing my time on the ArcGIS Runtime SDKs. I'm an Esri Certified ArcGIS Desktop Professional (10 years experience working with ArcGIS) with a wide range of technical skills including native application development, spatial databases, desktop/web GIS, and scripting. My Master's degree is in GIS with a focus in Natural Resource Management. Currently, I'm most interested in building cross-platform and lightweight apps using our ArcGIS Runtime SDK for Qt.