7
respostas

Erro ao rodar projeto pra o qrcode

Fui rodar o projeto e aconteceu isso

λ cordova run android --device
ANDROID_HOME=D:\Program Files\Android
JAVA_HOME=D:\Program Files\Java\jdk1.8.0_121
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.


BUILD FAILED

Total time: 12.708 secs
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
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.
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'.
> You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
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.
7 respostas

Parece que falta vc "assinar" aqueles termos do software, pois o erro diz:

You have not accepted the license agreements of the following SDK components: [Android Support Repository].

Daí ele manda uma dica para vc resolver:

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.

como eu resolvo?

Oi Jhones.

Como a mensagem ali mesmo já fala, pode tem que abrir o SDK Manager do Android (ou pelo ANdroid Studio, caso vc tenha ele instalado ou pela linha de comando)

eu abrir , mais eh pra abrir e fazer oq? eu nao entendi preciso de um passo a passo

Eu tbm nunca vi esse erro, então não tem como eu te passar um passo-a-passo.

Nesse link aqui (http://stackoverflow.com/questions/38096225/automatically-accept-all-sdk-licences), o cara está com o problema parecido com o seu. Veja se te ajuda.

nao deu certo

Consegui resolver. Provavel que você só tenha instalado as versóes do android no SDK Manager, abre o SDK Manager e vai até Extras e então instala o componente que ele esta pedindo que no caso é o Android Support Repository. Depois vai funcionar normal.