0

Using the wix react-native-navigation library: I have a ReactContextBaseJavaModule that (on request from my js app) starts an activity which contains the following code: mReactRootView = new ReactRootView(context); mReactInstanceManager.attachRootView(mReactRootView); and later mReactRootView.startReactApplication

all that works well. However, when I use a third part RN library in my "second" js app it tries to add a fragment in it's onAttachedToWindow method. The activity it gets from "getReactContext().getCurrentActivity()" is a NavigationActivity and it uses the fragment manager from that to try and add the fragment. I get the error "Can not perform this action after onSaveInstanceState". Is this because I'm getting the wrong activity back due to the navigation library interfering ?

4

1 回答 1

0

好的,刚刚发现我做错了什么。我正在创建扩展 AppCompatActivity 的活动 - 它应该扩展 ReactActivity

于 2018-03-29T08:43:35.463 回答