0
votes

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?

1
What is the ouput of echo $ANDROID_HOME ?schogges
Oh, sorry I forgot to mention that I am currently on Windows 10, but the output is $ANDROID_HOME.Bryant Ortega
On Windows you have to write echo %ANDROID_HOME%. Or just make sure that you have Android Studio and environment set up correctly. Anyways I'm not quite sure if this is the problem.schogges
The output is C:\Ortega\AppData\Local\Android\Sdk. I must mention though that Android Studio and my emulator are indeed setup correctly as everything was working perfectly fine before I upgraded react-native. I am also getting a few warnings when I run the command react-native run-android should I post those?Bryant Ortega
Please try this steps by which I am able to run the app, github.com/facebook/react-native/issues/…jrhamza

1 Answers

0
votes

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