“RNCSafeAreaView” was not found in the UIManager

前端 未结 6 1409
难免孤独
难免孤独 2021-02-13 09:56

I try to open a bundle, but when the android is running it shows the next message

2020-01-05 23:15:45.366 26210-26210/com.note.principal W/.note.princi

6条回答
  •  终归单人心
    2021-02-13 10:45

    In case you are NOT using ReactRootView (integrating existing apps to react-native)...

    You probably still need to add your package (packages which don't support autolinking yet, i.e., the new safe-area-view, for instance) to MainApplication.java:

    android/app/src/main/.../MainApplication.java
    

    On top, where imports are:

    import com.th3rdwave.safeareacontext.SafeAreaContextPackage;
    

    Add the SafeAreaContextPackage class to your list of exported packages.

    @Override
    protected List getPackages() {
        return Arrays.asList(
                new MainReactPackage(),
                /**other packages of yours**/
                new SafeAreaContextPackage()
        );
    }
    

提交回复
热议问题