DEV Community

idawnwon
idawnwon

Posted on

"Failed to install the following Android SDK packages..." When Building Android App on Android Studio

Failed to install the following Android SDK packages as some licences have not been accepted.
     platforms;android-26 Android SDK Platform 26
     build-tools;28.0.3 Android SDK Build-Tools 28.0.3
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Enter fullscreen mode Exit fullscreen mode

If it prompts like this above, try:

# macOS:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
Enter fullscreen mode Exit fullscreen mode

For GNU/Linux Distributions, Windows, refer to Felix Too's answer on Stack overflow

Top comments (0)