Search code examples
react-nativeandroid-studioinstallationadbavd-manager

AVD Manager: unable to locate adb in android studio


I'm just starting out my react track and thought of a little react-native app. Well, I installed Android Studio, the SDK and all that I needed according to https://reactnative.dev/docs/environment-setup, using the react-native CLI tab. But when I try to launch my emulator for any device on my list I get the error: AVD manager unable to locate adb. I have checked my %ANDROID_HOME% variable and it's set to the correct Sdk dir, I can use adb.exe inside the platform-tools dir with no apparent problem. But the AVD manager can't.

I even tried reinstalling Android SDK after deleting the platform-tools dir, or even installing a different version of it, but it just won't work!

Any thoughts on what is happening?


Solution

  • I struggled with this problem and the number 1 suggestion I found is:

    1. review your environment variables (such as %ANDROID_HOME%);
    2. remove the platform-tools dir inside %ANDROID_HOME%, adb.exe is either corrupted or missing;
    3. reinstall Android SDK and check for adb.exe inside %ANDROID_HOME%\platform-tools;
    4. emulate a new device (you are a wizard Harry!);

    Well, this didn't work for me but apparently worked for some people, especially for avast users (apparently it corrupts adb.exe 'cause it believes it to be malware).

    What worked for me was:

    1. In Android Studio go to File > Project Structure (Ctrl + Alt + Shift + S in windows);
    2. Under Project Settings>Project>Project SDK must have a valid Android SDK selected;
    3. emulate a new device (you are a wizard SadSack963!);