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:
I had the same issue and I used @peters.Wang answer to generate license and placed license folder inside sdk folder.
Thanks to @peters.Wang
You have to follow the helper text after
You have not accepted the license agreements of the following SDK components: in this situation you have to install [Android SDK Platform 24]. in fact the helper text in bracket [] drives you to the right way.
Install the latest Android Studio and accept the license agreement.
https://developer.android.com/studio/index.html
My software:
Ubuntu 16.04.2 LTS
Gradle 3.5
java version "1.8.0_131"
$ANDROID_HOME = ~/AndroidSDK
Working solution:
yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2
of course you should use your version of build-tools.
Source:
Automatically accept all SDK licences
Install the license:
mkdir "%ANDROID_HOME%\licenses"
echo |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" > "%ANDROID_HOME%\licenses\android-sdk-license"
I've solved my problem with this.
mkdir "%ANDROID_HOME%\licenses"
echo |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" > "%ANDROID_HOME%\licenses\android-sdk-license"