Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro no npx react-native run-android

Obtive isso no console, como presseguir?

  • Estou com Java 17.0.1
  • Node 16.15.0
  • Android Studio Chipmunk | 2021.2.1

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 874 file(s) to forward-jetify. Using 8 workers... info JS server already running. 'adb' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes. info Launching emulator... error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds. warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch. info Installing the app...

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5-rc-1/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

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

    SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\infra\Desktop\groceryStoreCli\android\local.properties'.

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. 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:compileDebugJavaWithJavac'.

    SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\infra\Desktop\groceryStoreCli\android\local.properties'.

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

1 resposta
solução!

Eu resolvi instalando tudo via chocolatey mesmo, mas obtive um erro na instalação do Node. Então desinstalei completamente o Node, npm e nvm. E instalei o Node novamente, porém pelo nvm. Reinstalei o Android Studio com o SDK tools e agora o emulador funciona com a aplicação.