3
respostas

Erro ao executar o comando react-native run-android

C:\Windows\System32\InstaluraMobile>react-native run-android
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
C:\Windows\System32\InstaluraMobile\android\app\build\intermediates\res\merged\debug: error: directory does not exist.

> Task :app:mergeDebugResources FAILED
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details

* 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 1m 0s
9 actionable tasks: 1 executed, 8 up-to-date
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

insira seu código aqui

3 respostas

Oi Adson, tudo bem? Você configurou o ambiente de desenvolvimento do Android? Que versão do Java e do Reactive Native você tá usando?

Desculpa a demora pra responder...

Sim, configurei o Android Studio também!

Segue as versões que solicitaste:

Microsoft Windows [versão 10.0.17134.523]
(c) 2018 Microsoft Corporation. Todos os direitos reservados.

C:\WINDOWS\system32>java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

C:\WINDOWS\system32>npm -version
6.4.1

C:\WINDOWS\system32>react-native -v
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory

C:\WINDOWS\system32>

Você conseguiu criar o emulador do Android? Pelo Android Studio por exemplo, você consegue? O erro praticamente me diz que ele não conseguiu instalar a app no emulador...