0

I'm using expo to build a React Native app with VS Code.

I get this error when I press a to open Android.

Failed to resolve the Android SDK path. Default install location not found: C:\Users\sukesh.y\AppData\Local\Android\Sdk. Use ANDROID_HOME to set the Android SDK location. Error: 'adb' is not recognized as an internal or external command, operable program or batch file.

enter image description here

In my machine, the SDK path is D:\Android\android-sdk

I have added the environment variables like this, with no luck:

enter image description here

Then, I also added the same in React Native configurations like this. Same error again:

enter image description here

As mentioned in other solutions for same question, I could not find the "Android" folder or the "local.properties" file. I guess it will not be created when we use expo.

sukesh
  • 2,379
  • 12
  • 56
  • 111
  • You need to set the path of adb into System Variables [link](https://stackoverflow.com/questions/20564514/adb-is-not-recognized-as-an-internal-or-external-command-operable-program-or) mack sure that you have an emulator installed in your system or you are running app in the real device then **use debugging enable** in developer option – Raj Parmar Jun 12 '23 at 07:55
  • @RajParmar I have updated the path in env. variables to D:\Android\android-sdk\platform-tools. It's still the same error. – sukesh Jun 12 '23 at 08:24
  • Refer to this link for solutions [TRY THIS](https://stackoverflow.com/questions/20564514/adb-is-not-recognized-as-an-internal-or-external-command-operable-program-or) I hope you set path in the system variables – Raj Parmar Jun 12 '23 at 08:32
  • @RajParmar I did add `D:\Android\android-sdk\platform-tools` in PATH. Now the error is `The system cannot find the path specified` – sukesh Jun 12 '23 at 09:22
  • You path is wrong bro mine is you have to go in AppData Folder **C:\Users\Lenovo\AppData\Local\Android\Sdk\platform-tools** and make sure that your platform-tools folder has adb.exe – Raj Parmar Jun 12 '23 at 09:36
  • I do not have any android folder in C:\users\appdata. The adb.exe does exist in D:\Android\android-sdk\platform-tools – sukesh Jun 12 '23 at 09:48
  • sorry my bad AppData is hidden by default – Raj Parmar Jun 12 '23 at 11:36

0 Answers0