I'm getting the following error when trying to install an android platform on a Cordova project. I've been following this guide: https://cordova.apache.org/docs/en/latest/guide/cli/
Error occurs when executing the following: $ cordova platform add android --save
A problem occurred configuring root project 'android'. You have not accepted the license agreements of the following SDK components: [Android SDK Platform 24].
I've searched all over for ways to accept the license agreement of Android SDK Platform 24, but no real luck.
Thank you ahead of time.
This question is tagged with
~ Asked on 2016-11-02 15:06:58
You can also just execute
Or for Windows execute
-- OR --
(credit for windows command to @puneet-kumar)
~ Answered on 2017-07-17 08:54:58
I'm not exactly sure how cordova works, but once the licenses are accepted it creates a file. You could create that file manually. It is described on this question, but here's the commands to create the required license file.
mkdir "$ANDROID_HOME/licenses" echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
mkdir "%ANDROID_HOME%\licenses" echo |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" > "%ANDROID_HOME%\licenses\android-sdk-license"
~ Answered on 2016-11-02 15:13:28