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

Erro ao executar "cordova run android"

Boa tarde! Estou com um problema ao executar o comando: "cordova run android", aparecendo o erro abaixo. Já consultei alguns fóruns sobre esse erro, mas não consegui resolver. Também já refiz uma instalação completa de todos os componentes: node, android, java, cordova. No android SDK, estão instalados o android SDK tools (25.1.7), android SDK Platform-tools (24.0.2), android SDK Build-tools (24.0.2), na aba TOOLS; na aba Android 7.0, o SDK Platform api 24, rev 2; e de Extras o Google USB Drive.

Agradeço qualquer orientação para auxiliar a resolver essa pane. obrigado.

C:\garconapp>cordova run android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.

BUILD FAILED

Total time: 2.364 secs
> failed to find target with hash string 'android-23' in: C:\Program Files (x86)\Android\android-sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> failed to find target with hash string 'android-23' in: C:\Program Files (x86)\Android\android-sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Please install Android target: "android-23".

Hint: Open the SDK manager by running: "C:\Program Files (x86)\Android\android-sdk\tools\android.bat"
You will require:
1. "SDK Platform" for android-23
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
3 respostas
solução!

Olá Leonardo.

A versão alvo está sendo a 23 e pelo erro, você não tem ela instalada. Como você mesmo falou, vc tem a 25 e 24.

Instalei a versão 23 do Android ou então tente mudar a a versão alvo do Android do seu aplicativo.

Obrigado, Lazaro !

Abri o Android SDK como administrador e consegui instalar a 23. Resolveu !!! Vlw !!!

Que bom que consegui ajudar.

Bons estudos.

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