Reputation: 910
I created a new React-Native project using react-native init AppName and when I tried to run in Android it throws Cannot get property 'dependencies' on null object in line @react-native-community\cli-platform-android\native_modules.gradle' line: 183 I am not sure why I am getting this exception. I didn't even do any changes in the project
Following is the command I use
react-native init Example
cd Example
npm i
react-native run-android
Version of react-native
react-native-cli: 2.0.1
react-native: 0.61.3
Version of npm - 6.11.2
Upvotes: 0
Views: 1440
Reputation: 910
Installing the @react-native-community/cli-platform-android using the below command solved my issue
npm i @react-native-community/cli-platform-android
If the above doesnot resolve the issue, I temporarily fix the issue by updating the native_modules.gradle like below
json = new JsonSlurper().parseText(reactNativeConfigOutput)
in node_modules@react-native-community\cli-platform-android\native_modules.gradle filereactNativeConfigOutput = reactNativeConfigOutput.substring(4);
above that line.Above fix the issue, but I think this is a temporary fix
Upvotes: 3