I'm trying to run the command ionic build android --release
to build the apk but i am getting this error
Total time: 1.767 secs 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 SDK Platform 24]. 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. Picked up _JAVA_OPTIONS: -Xmx512M
My software:
Working solution:
of course you should use your version of build-tools.
Source:
Install the latest Android Studio and accept the license agreement.
https://developer.android.com/studio/index.html
Install the license:
Install Platform 24 (Android 7) solved this problem
In Command Prompt, go to ANDROID_HOME\tools\bin
Then run the command, sdkmanager --licenses
Accept the licenses you want when it is prompted.
Install sdk 25 and accept the license from android studio. That solved my issues.