react-native-preloader icon indicating copy to clipboard operation
react-native-preloader copied to clipboard

Manified React error:#20

Open xiaozhicheng opened this issue 8 years ago • 9 comments

I get the error:

Manified React error:#20;for the full message or use the non-minified dev environment for full errors and additional hepful warning.

xiaozhicheng avatar Aug 31 '16 09:08 xiaozhicheng

Seems it's something wrong with your react code

markzhai avatar Aug 31 '16 09:08 markzhai

the white screen still has long time

xiaozhicheng avatar Aug 31 '16 10:08 xiaozhicheng

please check your adb log with TAG MrReactActivity to see if it's using cached view

markzhai avatar Aug 31 '16 10:08 markzhai

aslo,it give me the error: The specified child already has a parent. You must call removeView() on the child's parent first.

xiaozhicheng avatar Sep 01 '16 01:09 xiaozhicheng

@Override
protected void onDestroy() {
    super.onDestroy();

    if (mReactRootView != null) {
        mReactRootView.unmountReactApplication();
        mReactRootView = null;
        ReactPreLoader.onDestroy(getReactInfo());
    }

// getReactNativeHost().clear(); }

the view should be removed when activity destroyed, please check if your activity get destroyed

markzhai avatar Sep 01 '16 02:09 markzhai

Are you Chinese? 我是退出去后马上又进去报这个错误

xiaozhicheng avatar Sep 01 '16 02:09 xiaozhicheng

请贴下你的ReactActivity代码,看看你的onDestroy是否正确执行了,看上去是没有执行基类的onDestroy

markzhai avatar Sep 01 '16 02:09 markzhai

onDestroy调用问题,就是你退出页面,ondestory不会立即执行,再次进入又开始执行onCreate了,觉得你那个removeView在按back按钮之前调用

xiaozhicheng avatar Sep 01 '16 02:09 xiaozhicheng

@xiaozhicheng

dependencies { compile "com.github.markzhai:react-native-preloader:0.32.0" }

试试看这个

markzhai avatar Sep 01 '16 03:09 markzhai