Closed knowledges closed 6 years ago
Could be related to this
Try the steps mentioned there, and probably switch off Remote debug and Hot reload
Make sure you do not use AppRegistry.registercomponent('appName', () => App);
Just import App from './src/App';
and then in App.js, register the components and then use
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot(yourStackTree);
});
@spiraltrip Does this apply for the v.2 of RNN? Or is it applicable for the v.1 as well?
@perrosnk It applies to RNN2 because of registerAppLaunchedListener(). It needs to handle the native app launch event which must precede before React-Native's AppRegister.registerComponent() method. Well at least that's the experience and assumption I have.
There is no solution yet.
If react-native link react-native-navigation@latest
can be executed directly, it will be perfect.
This can block many problems.
我已经降级到0.47.1 办吧了 I have been downgraded to 0.47.1. run success
I'm having problems with RN 0.56, as do many many people reporting. We can only wait for a bug fix 0.57. But, Im using 0.55.4 and RNN 2.0.2514 with no problems at all. Not necessary to downgrade to 0.47.1
You would really need to know how to configure libraries in Android project files - settings.gradle, build.gradle & app/build.gradle, MainActivity and MainApplication java files. If you learn a bit more and understand what these files do, you will get it and make things works. These configurations are needed from time to time for many other libraries too, like splash screens, vector-icons, firebase, etc.
Simply using and relying on react-native link
The white screen problem could largely be due to problems in MainApplication file - as its the main file that creates a bridge between Android and React Native, and also loads any other javascript packages when the application starts. Also, since we are using React Native Navigation, we are extending the Application/Activity classes the provide. So check these files properly. You will solve the problem.
I'm trying to try.
Code Startup success,but android (Commd + M) invalid; I think it's a
MainApplication.java
problem, but I don't know where it is.package.json