码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2016-12-12 13:51:32      阅读:1870      评论:0      收藏:0      [点我收藏+]

标签:cpu   react   nat   rect   aix   caller   cto   text   led   

E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.edaixi.activity, PID: 3659
     at java.lang.Runtime.load0(Runtime.java:897)
     at java.lang.System.load(System.java:1505)
     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
     at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
     at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
     at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
     at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(Unknown Source)
     at com.facebook.soloader.DirectorySoSource.loadLibrary(Unknown Source)
     at com.facebook.soloader.SoLoader.loadLibraryBySoName(Unknown Source)
     at com.facebook.soloader.SoLoader.loadLibrary(Unknown Source)
     at com.facebook.react.bridge.ReactBridge.staticInit(Unknown Source)
     at com.facebook.react.bridge.ReactBridge.<clinit>(Unknown Source)
     at com.facebook.react.bridge.ReactBridge.staticInit(Unknown Source)
     at com.facebook.react.bridge.NativeMap.<clinit>(Unknown Source)
     at com.facebook.react.JSCConfig$1.getConfigMap(Unknown Source)
     at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundFromBundleLoader(Unknown Source)
     at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundInner(Unknown Source)
     at com.facebook.react.XReactInstanceManagerImpl.createReactContextInBackground(Unknown Source)
     at com.facebook.react.ReactRootView.startReactApplication(Unknown Source)
     at com.test.user.activity.MyReactActivity.onCreate(Unknown Source)
     at android.app.Activity.performCreate(Activity.java:6664)
     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
     at android.app.ActivityThread.-wrap12(ActivityThread.java)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
     at android.os.Handler.dispatchMessage(Handler.java:102)
     at android.os.Looper.loop(Looper.java:154)
     at android.app.ActivityThread.main(ActivityThread.java:6077)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

 

解决方案:

 defaultConfig {
      
        .........

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

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

  

出错手机是CPU为64位的,修改后,正常运行,React 页面正常显示.

  

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

标签:cpu   react   nat   rect   aix   caller   cto   text   led   

原文地址:http://www.cnblogs.com/spring87/p/6163867.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!