Git Product home page Git Product logo

Comments (6)

mydesweb avatar mydesweb commented on May 17, 2024 8

I also had to import com.facebook.react.bridge.JSIModulePackage; in MainApplication.java to make it work on android

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 17, 2024

I believe this works with v1.2.5 now, let me know if anyone can confirm

from react-native-mmkv.

GnApollo avatar GnApollo commented on May 17, 2024

2021-08-20 16:15:15.292 31642-31690/com.testapp D/SoLoader: Not resolving dependencies for libjscexecutor.so
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at java.lang.Runtime.load0(Runtime.java:938)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at java.lang.System.load(System.java:1631)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.SoLoader$1.load(SoLoader.java:405)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:77)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:50)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:89)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:860)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:740)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:654)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:634)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:582)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.swmansion.reanimated.NativeProxy.getDefaultJSExecutorFactory(NativeProxy.java:98)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.swmansion.reanimated.NativeProxy.<init>(NativeProxy.java:81)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.swmansion.reanimated.NodesManager.initWithContext(NodesManager.java:127)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:18)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.testapp.MMKVJSIPackage.getJSIModules(MMKVJSIPackage.java:16)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1265)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1023)
2021-08-20 16:15:15.294 31642-31690/com.testapp W/System.err:     at java.lang.Thread.run(Thread.java:919)
2021-08-20 16:15:15.294 31642-31690/com.testapp E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found result: 0
2021-08-20 16:15:15.296 31642-31690/com.testapp D/SoLoader: About to load: libturbomodulejsijni.so
2021-08-20 16:15:15.297 31642-31690/com.testapp D/SoLoader: libturbomodulejsijni.so not found on /data/data/com.testapp/lib-main
2021-08-20 16:15:15.297 31642-31690/com.testapp D/SoLoader: libturbomodulejsijni.so found on /data/app/com.testapp-6na_3ySNovN7Y7TsQ7pyLw==/lib/arm64
2021-08-20 16:15:15.297 31642-31690/com.testapp D/SoLoader: Not resolving dependencies for libturbomodulejsijni.so
2021-08-20 16:15:15.299 31642-31690/com.testapp D/SoLoader: Loaded: libturbomodulejsijni.so
2021-08-20 16:15:17.302 31642-31690/com.testapp I/ReactNativeJNI: Inspector::Inspector transitioning to initial state RunningDetached
2021-08-20 16:15:17.305 31642-31690/com.testapp I/MMKV: <MMKV.cpp:156::initialize> version v1.2.7 page size:4096
2021-08-20 16:15:17.305 31642-31690/com.testapp I/MMKV: <MMKV.cpp:167::initialize> armv8 AES instructions is supported
2021-08-20 16:15:17.305 31642-31690/com.testapp I/MMKV: <MMKV.cpp:175::initialize> armv8 CRC32 instructions is supported
2021-08-20 16:15:17.305 31642-31690/com.testapp I/MMKV: <MMKV.cpp:198::initializeMMKV> root dir: /data/user/0/com.testapp/files/mmkv
2021-08-20 16:15:17.306 31642-31690/com.testapp A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2 in tid 31690 (create_react_co), pid 31642 (onvergeagentapp)
2021-08-20 16:15:18.575 31642-31642/com.testapp W/ActivityThread: SCHED: com.testapp/.MainActivity [74, r=186ms, a=63ms, w=6242ms]

from react-native-mmkv.

GnApollo avatar GnApollo commented on May 17, 2024

MMKVJSIPackage.java

package com.testapp;

import com.facebook.react.bridge.JSIModuleSpec;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.ReactApplicationContext;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
import com.facebook.react.bridge.JSIModulePackage;
import com.reactnativemmkv.MmkvModule;

import java.util.Collections;
import java.util.List;

public class MMKVJSIPackage extends ReanimatedJSIModulePackage {
    @Override
    public List<JSIModuleSpec> getJSIModules(ReactApplicationContext reactApplicationContext, JavaScriptContextHolder jsContext) {
        super.getJSIModules(reactApplicationContext, jsContext);
        MmkvModule.install(jsContext, reactApplicationContext.getFilesDir().getAbsolutePath() + "/mmkv");
        return Collections.emptyList();
    }
}

from react-native-mmkv.

GnApollo avatar GnApollo commented on May 17, 2024

im using sir the latest version "react-native-mmkv": "^1.2.5",

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 17, 2024

This should work with 1.3.0 and above, so you can revert those two steps mentioned in my original comment. Let me know if you are still having issues autolinking MMKV.

from react-native-mmkv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.