Java.lang.UnsatisfiedLinkError: couldn't find "liblibstlport_shared.so


#1

I am very new to SQL Cipher. I read many stuff and implemented SQLCipher into my project.

I have put below JAR files into app/src/libs

  • commons-codec.jar
  • guava-r09.jar
  • sqlcipher.jar
  • sqlcipher-javadoc

I have put below file into app/src/main/assets

  • icudt46l.zip

I have put below file into app/src/main/jniLibs

  1. In Folder: armeabi

    • libdatabase_sqlcipher.so
    • libsqlcipher_android.so
    • libstlport_shared.so
  2. In Folder: armeabi-v7a

  • libdatabase_sqlcipher.so
  • libsqlcipher_android.so
  • libstlport_shared.so
  1. In Folder: x86
  • libdatabase_sqlcipher.so
  • libsqlcipher_android.so
  • libstlport_shared.so

Below my gradle file in android studio.

apply plugin: ‘com.android.application’

android {
compileSdkVersion 22
buildToolsVersion “22.0.1”

defaultConfig {
    applicationId "abc.com.sqlcipher"
    minSdkVersion 10
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
sourceSets {
    main {
        jniLibs.srcDirs = ['libs']
    }
}

}
dependencies {
compile fileTree(dir: ‘libs’, include: [’*.jar’]
compile ‘com.android.support:appcompat-v7:22.2.1’
}

After this, i run my application and it gets crash every time with below error.

  • java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/abc.com.sqlcipher-1/base.apk”],nativeLibraryDirectories=[/data/app/abc.com.sqlcipher-1/lib/arm, /vendor/lib, /system/lib]]] couldn’t find “liblibstlport_shared.so”

Please make me correct. How to solve this error. Please guide me ASAP.

Thanks


#2

Hello @rammansawala

Could you please try following these for use of SQLCipher for Android within Android Studio?