0

Al ejecutar npx react-native run-android, ocurre lo siguiente

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 960 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'installDebug' not found in project ':app'.
  • Try:
    Run gradlew tasks to get a list of available tasks. 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 5s
    error Failed to install the app. Make sure you have the Android development environment set up:
    https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

El error es algo largo, alguien sabe que hacer? soy nuevo en esto.

1
  • debes de tener instalado algún emulador android, para esto te recomiendo descargarte android studio y crear un dispositivo virtual.
    – Agustin
    Commented el 23 jun. 2020 a las 3:31

1 respuesta 1

0

Actualmente debes usar AndroidX, para migrar automáticamente tu proyecto incluyendo las bibliotecas de terceros existentes para usar las dependencias de AndroidX debes agregar dentro de tu archivo gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

ahora realiza lo siguiente :

   $ npm install --save-dev jetifier   
   $ npx jetify  

e inicia como lo que indica el mensaje, agrega el flag:

   $ npx react-native run-android --no-jetifier

Revisa:

Cómo migrar a AndroidX

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.