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

react-native run-android - Build Failed

Fiz todos os passos conforme orientado, mas na hora do run-android a Build falha ...

Microsoft Windows [versão 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\BlackZ\OneDrive\Developer\React-Native\instaluraMobile>react-native run -android

info JS server already running. info Building and installing the app on the device (cd android && gradlew.bat ap p:installDebug)...

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'.

    The SDK directory 'c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk' 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 1s 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.

C:\Users\BlackZ\OneDrive\Developer\React-Native\instaluraMobile>

3 respostas
solução!

Na hora de inserir a variavel de ambiente voce tinha que ter trocado o YOU_USERNAME pelo seu nome de usuario da maquina, se quiser fazer um teste, vai no terminal e digita : cd c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

Se não funcionar é porque o caminho não existe, pra funcionar ficaria por exemplo: c:\Users\nicholas\AppData\Local\Android\Sdk, é só trocar o YOURUSERNAME, pelo nome que tu colocou na sua maquina ou usuario atual

Nicholas Wesley, obrigado pela resposta ... Mas, agora estou com outro erro, parecido, mais é diferente.

Microsoft Windows [versão 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\BlackZ\OneDrive\Developer\React-Native\instaluraMobile>react-native run -android

info JS server already running. info Building and installing the app on the device (cd android && gradlew.bat ap p:installDebug)... Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reus ed, use --status for details

Task :app:installDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':app:installDebug'.

    File 'c:\Users\BlackZ\AppData\Local\Android\Sdk\platform-tools\adb.exe' specif ied for property 'adbExe' 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:comm and_line_warnings

BUILD FAILED in 52s 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.

C:\Users\BlackZ\OneDrive\Developer\React-Native\instaluraMobile>

Obrigado ... Consegui resolver ...

Tive que baixar o arquivo adb.exe e colocar dentro da pasta 'c:\Users\BlackZ\AppData\Local\Android\Sdk\platform-tools.

Tudo funcionando ...

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software