Estoy tratando de obtener una emulación de android a través de ionic. Para ello me voy a la carpeta de mi proyecto y escribo ionic cordova emulate android
. Me encuentro que me da un "FAILURE" y dos "BUILD FAILED".
El mensaje del FAILURE es el siguiente:
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':CordovaLib'.
You have not accepted the license agreements of the following SDK components: [Android SDK Platform 26]. 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.
Get more help at https://help.gradle.org
Busco un poco por google y enseguida llego a una pregunta del sitio de stackoverflow en inglés con varias respuestas, me centro en la más votada:
The way to accept license agreements from command line has changed. You can use the SDK manager which is located at:
~/Library/Android/sdk/tools/bin
Run the sdkmanager as follows:
./sdkmanager --licenses
And accept the licenses you did not accept yet but do need.See for more details the Android Studio documentation, although the current documentation is missing any description on the --licenses option.
Abro el cmd de windows:
introduzco cd C:\android-sdk-windows\tools\bin
y después escribo: sdkmanager --licenses
y me sale lo siguiente:
¿Cómo puedo aceptar la licencia del componente "Android SDK Platform 26" ?