libjsc.so在react-native中找不到 - 版本0.41

时间:2017-12-23 01:54:12

标签: android react-native

我正在使用react native 0.41,我的应用程序崩溃,下面提供了例外。我解压了本地aar的反应,但没有在jni /文件夹下找到libjsc.so。我如何提供libjsc.so

12-22 17:31:44.103 2273-2273/com.example.sampleapp.photos E/art: dlopen("/data/app/com.example.sampleapp.photos-1/lib/x86/libreactnativejni.so", RTLD_LAZY) failed: dlopen failed: library "libjsc.so" not found
12-22 17:31:44.181 2009-2657/com.google.android.gms E/MDM: [171] wvj.run: Couldn't connect to Google API client: ksj{statusCode=API_UNAVAILABLE, resolution=null, message=null}
12-22 17:31:44.214 2273-2273/com.example.sampleapp.photos E/AndroidRuntime:
FATAL EXCEPTION: main
    Process: com.example.sampleapp.photos, PID: 2273
    java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
        at java.lang.Runtime.load(Runtime.java:331)
        at java.lang.System.load(System.java:981)
        at com.facebook.soloader.SoLoader$1.load(SoLoader.java:279)
        at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:69)
        at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:40)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:427)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:367)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:332)
        at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:24)
        at com.facebook.react.bridge.ReactBridge.<clinit>(ReactBridge.java:20)
        at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:24)
        at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:22)
        at com.facebook.react.JSCConfig$1.getConfigMap(JSCConfig.java:14)
        at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundFromBundleLoader(XReactInstanceManagerImpl.java:431)
        at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundInner(XReactInstanceManagerImpl.java:426)
        at com.facebook.react.XReactInstanceManagerImpl.createReactContextInBackground(XReactInstanceManagerImpl.java:370)
        at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:215)
        at com.example.reactnative.ReactActivity.runReactComponent(ReactActivity.java:107)
        at com.example.reactnative.ReactActivity.createReactComponentView(ReactActivity.java:120)
        at com.example.reactnative.ReactActivity.onCreate(ReactActivity.java:49)

1 个答案:

答案 0 :(得分:0)

尝试这些事情

在根项目中找到gradle.properties文件,然后添加

Android.useDeprecatedNdk=true

并在build.gradle中添加此

android {  
    ...  
    defaultConfig {  
        ...  
        ndk {  
            abiFilters "armeabi-v7a", "x86"  
        } 
    }
}