Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro ao rodar o run-android

Alguém sabe como resolver?

C:\Windows\System32\myapp>react-native run-android info JS server already running. info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...

Task :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:mergeDebugResources'.

    java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed C:\Windows\System32\myapp\android\app\build\intermediates\res\merged\debug: error: directory does not exist.

  • 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 2s 9 actionable tasks: 1 executed, 8 up-to-date error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

3 respostas

Dentro do diretório do seu projeto, tente rodar:

cd android && gradlew clean && cd .. && react-native run-android

Estou com o mesmo problema, ao tentar rodar o comando do Otávio ele aparece o erro:

BUILD FAILED in 2s 26 actionable tasks: 1 executed, 25 up-to-date error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

Em seguida retorna o mesmo erro do Giovany, poderia me ajudar ?

solução!

Paulo,

Esse erro que você comentou parecer ser o mesmo desse tópico: https://cursos.alura.com.br/forum/topico-erro-durante-execucao-do-comando-react-native-run-android-66568