I tried to update my Android Studio and got this error. How can I fix this?
I don\'t have much experience with Android studio and Android app development.
I
This is what worked:
Just delete the directory C:/Users/%user%/AppData/Local/Android/sdk and rename the other directory in that location from sdk1 to sdk. Restart Android Studio (close projects) and an assistant will pop-up asking you to update the sdk which will be detected during that process, so a re-download won't be necessary.
This fixed it for me (on a fully-patched Ubuntu 16.04 (Xenial Xerus)).
Disclaimer: I cleaned up everything beforehand:
rm -Rf ~/android-studio/ ~/.AndroidStudio2.2/ ~/.android/ ~/Android/
Then:
wget https://dl.google.com/dl/android/studio/ide-zips/2.3.0.8/android-studio-ide-162.3764568-linux.zip
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip android-studio-ide-162.3764568-linux.zip -d ~/
mkdir -p ~/Android/sdk
unzip tools_r25.2.3-linux.zip -d ~/Android/sdk
~/Android/sdk/tools/bin/sdkmanager "platforms;android-25"
~/Android/sdk/tools/bin/sdkmanager --channel=3 emulator
~/android-studio/bin/studio.sh
My solution using Void Linux (it should fix for other distributions too):
Create a new folder named Sdk
in this exact path. Bash example: $ mkdir $HOME/Android/Sdk
cd
to this folder, and download the latest SDK command line version. Bash example: $ curl https://dl.google.com/dl/android/studio/ide-zips/2.3.0.8/android-studio-ide-162.3764568-linux.zip
Extract the android-studio-ide-162.3764568-linux.zip. It must be this way: $HOME/Android/Sdk/tools
Launch Android Studio, and then proceed with normal installation.
PS: If you don't have a Android folder on your $HOME, you should create it, and then make the steps 1, 2, and 3, select the $HOME/Android/Sdk
Folder in Android Studio → Configure → *SDK Manager → Edit, and proceed to step 4.
Temporarily change update channel to Canary Channel (Settings > Appearance & Behavior > System Settings > Updates). It works for me (Windows, Android Studio 2.3) I hope, this bug will be fixed in the next version of Android Studio.
This is what worked for me:
bin
folder to the PATH.sdkmanager "platforms;android-25"
I hope this works for you too.