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:
Please visit https://discuss.circleci.com/t/licences-for-android-build-tools-not-accepted/17285/18
dependencies:
override:
echo y | android update sdk --no-ui --all --filter build-tools-26.0.2,android-26
instead of my original:
dependencies:
override:
echo y | android update sdk --no-ui --all --filter build-tools-26.0.2
Install Platform 24 (Android 7) solved this problem
This worked for me under ubuntu :
mkdir "$ANDROID_SDK/licenses" || true
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license"
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_SDK/licenses/android-sdk-preview-license"
source: Dori's answer to automatically-accept-all-sdk-licences
I had same situation and all of the above suggestion did not work because either my installation and component folder names are different or the files are in different places.
I had old installation of Android Studio in C and new in E. I had uninstalled the old version but Android studio did not clear all files and reset my Env. Variable. So I simply did following
1) Searched for this file: android-sdk-license
2) See if above file is in folder Licenses surrounded by other folders like add-ons, build-tools, emulator etc.
3) Then make sure ANDROID_HOME is pointing to this parent folder of Licenses.
If you are having issues coming from a newer version of Android SDK then change your target version in your config.xml.
Next, open Android Studio>Configure>SDK Manager
Check the version you need for 24 use 7.0 and check it. Then install it and try to build again.
Install sdk 25 and accept the license from android studio. That solved my issues.