With the current react-native version (0.69.1), RNN is not usable, even when the new architecture is disabled.
The following error pops up in android: null is not an object (evaluating this.nativeCommandsModule.setRoot)
Create a new project with react-native init <project>
Execute npx rnn-link inside project
I don't know if this is neccessary, but I added the missing lines rnn-link did not added inside the build.gradle-files but are added inside the manual installation instructions (maybe the installation instructions is old?)
Add include ':react-native-navigation' and
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/') to settings.properties (this was also in my main project)
Add implementation project(':react-native-navigation') to the dependencies of app/build.gradle. This was also in my main project. Before this step, npm run android would not build the apk
Replace content of index.js with the content of the installation instructions
🐛 Bug Report
With the current react-native version (0.69.1), RNN is not usable, even when the new architecture is disabled. The following error pops up in android:
null is not an object (evaluating this.nativeCommandsModule.setRoot)
Have you read the Contributing Guidelines on issues?
yes
To Reproduce
react-native init <project>
npx rnn-link
inside projectinclude ':react-native-navigation'
andproject(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/')
to settings.properties (this was also in my main project)implementation project(':react-native-navigation')
to the dependencies of app/build.gradle. This was also in my main project. Before this step,npm run android
would not build the apkindex.js
with the content of the installation instructionsnpm run android
. The Error is shown.Here is a reproducable repo. Just call
npm install
andnpm run android
and you'll get the error https://github.com/churchtools/rnn-null-is-not-an-objectExpected behavior
The app starts normal, without any error
Actual Behavior
The error is displayed.
Your Environment
Reproducible Demo
Here is a reproducable repo. Just call
npm install
andnpm run android
and you'll get the error https://github.com/churchtools/rnn-null-is-not-an-objectAre you willing to resolve this issue by submitting a Pull Request?