running react-native run-android in windows but get this error:
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 :ReactNative:Unexpected empty result of running 'npx --quiet --no-install react-native config' command from 'null' directory. :ReactNative:Running 'npx --quiet --no-install react-native config' command from 'null' directory failed.
FAILURE: Build failed with an exception.
Where: Script '/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 170
What went wrong: A problem occurred evaluating script.
Command
config
unrecognized. Make sure that you have runnpm install
and that you are inside a react-native project.
Try running (inside android folder)
./gradlew clean
and then run
react-native run-android
Add this to gradle.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
and add this to gradle.wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
then run react-native run-android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With