Brew cask install android-sdk suddenly failing with error "licenses not accepted"



The build command “brew cask install android-sdk” started failing a couple hours ago, even for builds that had previously succeeded. I get the error:

Failed command:
/usr/local/Caskroom/android-sdk/3859397,26.0.2/tools/bin/sdkmanager tools platform-tools build-tools;26.0.2

==> Standard Output of failed command:
License android-sdk-license:

Terms and Conditions

This is the Android Software Development Kit License Agreement

1. Introduction
… {etc} …

Accept? (y/N): Skipping following packages as the license is not accepted:
Intel x86 Emulator Accelerator (HAXM installer)
The following packages can not be installed since their licenses or those of the packages they depend on were not accepted:
** extras;intel;Hardware_Accelerated_Execution_Manager**
** emulator**
** tools**

Looks like an agreement that needs to be accepted in order to install. However, I’m at a loss as to how to accept the agreement.

Anyone have any solutions to this?


You could try yes:
yes | brew cask install android-sdk


Tried that and a few variations of that like echo "yes" | brew cask install android-sdk and echo "y" | brew cask install android-sdk . Unfortunately, none of them changed the error.


Ok, was worth a try. (For what it’s worth I also couldn’t make that work for what I was trying that needed manual input)