1
resposta

Eu deixo o simulador do android tudo certinho aberto só que da esse erro:

C:\Users\COTACÃO-01\appmobiledynamix>react-native run-android
Scanning folders for symlinks in C:\Users\COTACÃO-01\appmobiledynamix\node_modules (165ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Checking the license for package Android SDK Build-Tools 23.0.1 in C:\Users\COTAC├O-01\AppData\Local\Android\sdk\licenses
Warning: License for package Android SDK Build-Tools 23.0.1 not accepted.
Checking the license for package Android SDK Platform 23 in C:\Users\COTAC├O-01\AppData\Local\Android\sdk\licenses
Warning: License for package Android SDK Platform 23 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 23, Android SDK Build-Tools 23.0.1].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 59.26 secs
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/android-setup.html

Obs: ja instalei de tudo configurei pasta mais mesmo assim da esse erro poderiam me ajudar falando oque pode ser que esta mal configurado? ai sabendo oque pode ser eu foco naquilo!

Obg!

1 resposta

Fala Matheus, tudo bem ?

Na verdade parece que o único problema é sobre o aceite das licenças do sdk do Android. Por isso ele dando build failed.

> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 23, Android SDK Build-Tools 23.0.1]

Dê uma olhada nessa dúvida. É o mesmo problema que está enfrentando => https://cursos.alura.com.br/forum/topico-comando-run-47541

Você precisa aceitar as licenças e dá pra configurar pra elas serem aceitas automaticamente (ultima resposta da thread citada acima).

Espero ter ajudado. Abraço!

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