# SQLCipher for Android - Native Library Support

**URL:** <https://discuss.zetetic.net/t/sqlcipher-for-android-native-library-support/1440>\
**Category:** Issues\
**Created:** [June 14, 2016, 5:39pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-native-library-support/1440 "2016-06-14T17:39:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [June 14, 2016, 5:39pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-native-library-support/1440/1 "2016-06-14T17:39:02Z")

</div>

**Note** : SQLCipher for Android now _includes_ support for both 32-bit and 64-bit platforms. This post will remain as the reference to ABI splits may be helpful to some users.

* * *

SQLCipher for Android currently includes support for `armeabi`, `armeabi-v7a`, and `x86` only. At this time we do not include support for either `arm64`, or `x86_64` as OpenSSL does not currently build on those platforms without modification of the standard OpenSSL build system. We currently expect OpenSSL to include support for `arm64` and `x86_64` with the 1.1.0 release, which is not yet available.

SQLCipher for Android will still run on Android devices that have 64 bit CPU’s, however if you are using other third-party libraries that include native libraries that include either `arm64`, or `x86_64`, you may receive an error message like below:

```auto
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/xxx/base.apk"],nativeLibraryDirectories=[/data/app/xxx/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libstlport_shared.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:989)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:173)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:169)

```

Due to Android’s preferential loading process, if, for example, your APK is including other third-party libraries that contain native libraries that target architectures other than `armeabi`, `armeabi-v7a`, or `x86`, Android will attempt to load _all_ native libraries from within the folder that is the closest match for its platform architecture, thus causing the error above when it attempts to locate SQLCipher for Android within a 64 bit platform folder.

This issue can be addressed by removing any included native libraries for architectures other than `armeabi`, `armeabi-v7a`, and `x86`; this allows the Android device to load the 32 bit version of all libraries, even on a 64 bit device. For gradle users, you can utilize the [ABI split](http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits#TOC-ABIs-Splits) feature.
