React-native: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.test.activity/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit

Created on 12 Dec 2016  路  3Comments  路  Source: facebook/react-native

Description

hi,boys ,when i use react native in my android application and
my device info:
Name->EVA-AL00
system->Android 6.0
cpu->Hisilicon Kirin 955

my react info:
"dependencies": {
"react": "^15.4.1",
"react-native": "^0.39.1"
}
compile "com.facebook.react:react-native:+"

has below exception:

Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.edaixi.activity/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit

Reproduction

Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.edaixi.activity/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit
2 at java.lang.Runtime.load(Runtime.java:344)
3 at java.lang.System.load(System.java:1079)
4 at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
5 at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
6 at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
7 at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
8 at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
9 at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
10 at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
11 at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
12 at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
13 at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
14 at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
15 at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
16 at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
17 at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
18 at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
19 at com.facebook.soloader.SoLoader.loadLibrary(Unknown Source)
20 at com.facebook.react.bridge.ReactBridge.staticInit(Unknown Source)
21 at com.facebook.react.bridge.ReactBridge.(Unknown Source)
22 at com.facebook.react.bridge.ReactBridge.staticInit(Unknown Source)
23 at com.facebook.react.bridge.NativeMap.(Unknown Source)
24 at com.facebook.react.JSCConfig$1.getConfigMap(Unknown Source)
25 at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundFromBundleLoader(Unknown Source)
26 at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundInner(Unknown Source)
27 at com.facebook.react.XReactInstanceManagerImpl.createReactContextInBackground(Unknown Source)
28 at com.facebook.react.ReactRootView.startReactApplication(Unknown Source)
29 at com.edaixi.user.activity.MyReactActivity.onCreate(Unknown Source)
30 at android.app.Activity.performCreate(Activity.java:6372)
31 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
32 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2432)
33 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
34 at android.app.ActivityThread.-wrap11(ActivityThread.java)
35 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
36 at android.os.Handler.dispatchMessage(Handler.java:102)
37 at android.os.Looper.loop(Looper.java:150)
38 at android.app.ActivityThread.main(ActivityThread.java:5665)
39 at java.lang.reflect.Method.invoke(Native Method)
40 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
41 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)

Locked

Most helpful comment

found solution from: https://corbt.com/posts/2015/09/18/mixing-32-and-64bit-dependencies-in-android.html

defaultConfig {
....

    ndk {
        abiFilters "armeabi-v7a", "x86"
    }

    packagingOptions {
        exclude "lib/arm64-v8a/libgnustl_shared.so"
    }
}

All 3 comments

found solution from: https://corbt.com/posts/2015/09/18/mixing-32-and-64bit-dependencies-in-android.html

defaultConfig {
....

    ndk {
        abiFilters "armeabi-v7a", "x86"
    }

    packagingOptions {
        exclude "lib/arm64-v8a/libgnustl_shared.so"
    }
}

@hpu-spring87 Having same problem. Made fix in build.gradle, but error still remains...

I have the same problem, why?

Was this page helpful?
0 / 5 - 0 ratings