简体   繁体   中英

React-Native Run-Android Not Working After Upgrading

I have recently upgraded my app's react-native version to 0.60, and want to run the app on an android emulator to see if everything is working as it should be. When I ran the command react-native run-android I get an error that says: 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.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong: Could not determine the dependencies of task ':app:preDebugBuild'.

    Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. What can I do to successfully run my app?

below these may clear the issue I guess;

  • upgrade NODE and NPM if necessary (this solved my issue)
  • gradle clean on android
  • delete node modules and re-install npm (since on npm installation there should be no network interruption)
  • make sure any of the packages are not linked properly.
  • re-open terminal

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM