question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError: com.facebook.react.bridge.WritableNativeMap

See original GitHub issue

I’ve just enter a NoClassDefFoundError when I re-start my MainActivity. But I don’t know the reason why will cause the error. Can somebody give me a clue to fix it? Thanks a lot.

    java.lang.NoClassDefFoundError: com.facebook.react.bridge.WritableNativeMap
     at com.facebook.react.JSCConfig$1.getConfigMap(JSCConfig.java:14)
     at com.facebook.react.XReactInstanceManagerImpl.onJSBundleLoadedFromServer(XReactInstanceManagerImpl.java:739)
     at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundInner(XReactInstanceManagerImpl.java:399)
     at com.facebook.react.XReactInstanceManagerImpl.createReactContextInBackground(XReactInstanceManagerImpl.java:370)
     at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:213)
     at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:101)
     at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:91)
     at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54)
     at com.shefenqi.mall.MainActivity.onCreate(MainActivity.java:42)
     at android.app.Activity.performCreate(Activity.java:6366)
     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1124)
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2661)
     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2779)
     at android.app.ActivityThread.-wrap11(ActivityThread.java)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
     at android.os.Handler.dispatchMessage(Handler.java:111)
     at android.os.Looper.loop(Looper.java:207)
     at android.app.ActivityThread.main(ActivityThread.java:5968)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:939)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:800)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
get2abhicommented, Jul 13, 2017

Write this code in the very beginning of the application. We are using react native 0.0.45

import com.facebook.soloader.SoLoader;

@Override public void onCreate() {

...
...
SoLoader.init(getApplicationContext(), /* native exopackage */ false);
//SoLoader.loadLibrary("fbjni"); //uncomment this line if the issue is not resolved
}
0reactions
hramoscommented, Sep 21, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we’re automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - NoClassDefFoundError com.facebook.react.bridge ...
NoClassDefFoundError com.facebook.react.bridge.WritableNativeMap ... Any help would be appreciated. ... After crash, the issue is gone on next run.
Read more >
com.facebook.react.bridge.WritableNativeMap.<init ... - Tabnine
Best Java code snippets using com.facebook.react.bridge.WritableNativeMap.<init> (Showing top 1 results out of 315).
Read more >
Java Examples for com.facebook.react.bridge ... - Javatips.net
This java examples will help you to understand the usage of com.facebook.react.bridge.WritableNativeMap. These source code samples are taken from different ...
Read more >
How to Integrate an Existing Android App with React Native
In this guide, I will be going through how to integrate an existing Android application with React Native. This might be useful if...
Read more >
Example usage for com.facebook.react.bridge ... - Java2s.com
static WritableMap bundleCoupon(final Coupon coupon) { final WritableMap couponMap = new WritableNativeMap(); couponMap.putString("title", coupon.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found