- Open android studio.
- Open SDK Manager (
Tools -> SDK Manager
). - Open
SDK Tools
tab. - Enable
Android SDK Command-line Tools
and click Apply. - Open Terminal.
Enter
cd ~/Android/Sdk/cmdline-tools cd latest/bin export JAVA_HOME="$HOME/android-studio/jre/" ./sdkmanager --licenses
y
for all the prompts.