You have several options to make react-native commands work.
in the node_modules directory of your package make a symlink to the node_modules/react-native directory from the root of the project because react-native-cli need to find cli.js in node_modules/react-native.
prefix your command with yarn or npm : yarn react-native run-android
in your package.json file add a script "run-android": "react-native run-android" and then use yarn run-android
I used second option. However, I am using third party libraries and it cannot resolve these dependencies!
Could not resolve project :react-native-navigation.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-navigation: None of the consumable configurations have attributes.
Could not resolve project :react-native-vector-icons.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-vector-icons: None of the consumable configurations have attributes.
There is a "Run" green button inside Android Studio that will open the app inside an emulator.
Thank you so much. I just wanted to make sure that im not missing anything because I couldn't get "react-native run-android" to work.
You have several options to make
react-native
commands work.node_modules
directory of your package make a symlink to thenode_modules/react-native
directory from the root of the project because react-native-cli need to findcli.js
innode_modules/react-native
.yarn react-native run-android
"run-android": "react-native run-android"
and then useyarn run-android
I used second option. However, I am using third party libraries and it cannot resolve these dependencies!
Solved,
I changed projectDir attribute of library in android/settings.gradle