Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Should Initialize MMKV from MainActivity #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keShraa
Copy link
Contributor

@keShraa keShraa commented Oct 25, 2021

[ANDROID] Removed setupLibrary (MMKV.initialize method) from React Native logic.

Now you should init MMKV from your own MainActivity file and don't forget to import implementation 'com.tencent:mmkv-static:1.2.10' in your app/build.gradle

By doing so, we are trying to avoid a crash caused by the MMKV.initialize method.

Fatal Exception: java.lang.RuntimeException: Could not invoke RNFastStorage.setupLibrary

   at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:383)
   at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
   at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
   at android.os.Handler.handleCallback(Handler.java:873)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
   at android.os.Looper.loop(Looper.java:214)
   at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
   at java.lang.Thread.run(Thread.java:764)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant