paypal / paypal-here-sdk-android-distribution

Add credit card (swipe & key-in) capabilities to your Android app
Other
84 stars 95 forks source link

Seeing java.lang.IllegalStateException: J2V8 native library not loaded runtime exception in 2.0 SDK #118

Closed i2infinity closed 6 years ago

i2infinity commented 6 years ago

2.0 version of SDK is throwing a `java.lang.IllegalStateException: J2V8 native library not loaded runtime exception on my App

java.lang.IllegalStateException:J2V8 native library not loaded.
java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[,nativeLibraryDirectories=[/data/app/com.gettaxi.dbx.android-1/lib/arm64, /data/app/com.gettaxi.dbx.android-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64] couldn't find "libj2v8.so"
i2infinity commented 6 years ago

This is a known issue https://github.com/eclipsesource/J2V8/issues/174

The proposed work around is to add the following ndk support to android.defaultConfig of your App's build.gradle

android {
    ....
    defaultConfig {
        ....
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
        }
    }
}
i2infinity commented 6 years ago

PayPal Here App uses this fix currently and it is working fine. Native 64 bit support for this SDK will come with an upcoming release

Hypnoticbg commented 11 months ago

For kotlin based gradle files you should change it to:

//https://github.com/paypal/paypal-here-sdk-android-distribution/#installation ndk { abiFilters.addAll(listOf("armeabi", "armeabi-v7a", "x86", "mips")) }

Bhing09 commented 10 months ago

Run