banditKing
banditKing

Reputation: 9579

Android SDK on Android Studio Unavailable on Mac M2 after removing and then reinstalling Android Studio

I had some errors on the Android studio. So I decided to remove the installation(which had worked fine for months). I followed some tutorials online to do this.

But Im afraid I messed it up somehow. So Im now tying to install it properly over the last 2 days but having no luck with any online instructions. The error is always the same no matter what I try.

My system is: MacBook Air Apple M2 macOS Sonoma 14.4.1

So far I have done this:

  1. Moved Androidstudio.app to Trash from Finder/Applications
  2. Deleted everything under:/Library/Android/sdk
  3. Deleted any Android or Android Studio folders under: /Library/Application Support/ /Library/Caches/ /Library/Preferances/Xamarin/
  4. Disabled the "ANDROID_HOME" env var in the bash_profile

enter image description here enter image description here After removing all the existing content related to Android. I proceeded to do a fresh installation based on the docs here: https://reactnative.dev/docs/environment-setup?guide=native&platform=android

Then I installed Android Studio Iguana from here: https://developer.android.com/studio

Once everything was installed, I started getting errors as follows: enter image description here enter image description here enter image description here enter image description here enter image description here

Thanks

Im not sure how to get the missing SDK. Since all the docs say it would be downloaded from the sdk tab in Android Studio. Deleting Android studio and re-installing doesnt change the errors, Ive done it 4-5 times.

Has anyone ever come across this scenario? Kindly advise what would be some things that I should try?

Upvotes: 1

Views: 815

Answers (4)

user27749302
user27749302

Reputation: 1

Answer proivided by Hubert and PieroP is correct. I just disabled firewall and BAM! Everything works fine ;) No need to reinstall system etc.

Upvotes: 0

PieroP
PieroP

Reputation: 11

Just tried again this disabling the antivirus firewall and installing the Android SDK from within the freshly installed Android Studio worked fine:

  • Mac OS Sequoia 15.0.1 (24A348)
  • Apple M2 Max (Apple Silicon)
  • Android Studio Ladybug | 2024.2.1
  • Anroid 14.0 ("UpsideDownCake")

Upvotes: 1

Njuacha Hubert
Njuacha Hubert

Reputation: 566

Had a similar issue. after weeks of wondering what could be the problem. I just turned off the firewall of an anti virus I had installed and tried installing again and it worked. Android studio was able to automatically download the Android Sdk as expected.

Upvotes: 0

banditKing
banditKing

Reputation: 9579

Nothing worked so I had to wipe off and reinistall my Mac OS and then donwload Android Studio as a fresh install. So my suggestion to anyone when it comes to Android Studiois dont follow the online posts to delete files etc related to Android studio. Be careful.

Upvotes: 0

Related Questions