Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

[Bug] Erro ao executar o comando npx react-native run-android

> Task :react-native-gradle-plugin:compileKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:pp on Android...
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
> Failed to query the value of task ':react-native-gradle-plugin:compileKotlin' property 'compilerRunner$kotlin_gradle_plugin'.:react-native-gradle-plugin:compileKotlin FAILED
   > Kotlin could not find the required JDK tools in the Java installation. Make sure Kotlin compilation is running on a JDK, not JRE.
FAILURE: Build failed with an exception.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.ileKotlin'.
> Run with --scan to get full insights.eact-native-gradle-plugin:compileKotlin' property 'compilerRunner$kotlin_gradle_p
lugin'.
* Get more help at https://help.gradle.orgK tools in the Java installation. Make sure Kotlin compilation is running on a
 JDK, not JRE.
BUILD FAILED in 6m 42s
1 actionable task: 1 executed
C:\MeuApp\android>
C:\MeuApp\android>to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6m 32s

Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
> Failed to query the value of task ':react-native-gradle-plugin:compileKotlin' property 'compilerRunner$kotlin_gradle_plugin'.
   > Kotlin could not find the required JDK tools in the Java installation. Make sure Kotlin compilation is running on a JDK, not JRE.

* 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 6m 32s

    at makeError (C:\MeuApp\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
    at C:\MeuApp\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (C:\MeuApp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:85:5)
    at async Command.handleAction (C:\MeuApp\node_modules\@react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.

Alguém passou por algo parecido para me ajudar no TroubleShoot? Apps instalados, variáveis criadas e testadas. O sistema reconhece os dispositivos, tanto virtual quanto físico, via adb devices.

1 resposta
solução!

Bom, problema resolvido. Instalei Gradle, Instalei o JDK11 via exe diretamente do site Oracle. Implementei variáveis do sistema para diversos programas. Mas o passo primordial é reiniciar o PC a cada mudança que vc faz. Ele precisa desse reset pra aplicar algumas alterações. Ontem eu simplesmente desisti, mas hoje de manhã funcionou, por que desliguei minha máquina ontem e religuei hoje. Esse foi o passo essencial para a aplicação rodar.

Dica, procure os erros na internet e vai tratando os problemas vez por vez até buildar. Vai dar certo! Uma hora vai! Rsrsrs...