Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Change ADB path in Expo #4776

Closed
looney-toon opened this issue Oct 28, 2023 · 1 comment
Closed

Change ADB path in Expo #4776

looney-toon opened this issue Oct 28, 2023 · 1 comment
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@looney-toon
Copy link

Summary

I have a different path for AndroidSDK but I am unable to use that adb path in expo, whenever I try to open it on android by pressing a in cli it gives the following error:

Error: 'C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb' is not recognized as an internal or external command,
operable program or batch file.

There should be a way to change the adb path to match wherever AndroidSDK is located for a user.

Environment

expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.22621
Binaries:
Node: 20.9.0 - C:\Program Files (x86)\nodejs\node.EXE
npm: 10.2.1 - C:\Program Files (x86)\nodejs\npm.CMD
IDEs:
Android Studio: AI-223.8836.35.2231.10811636
npmPackages:
expo: ~49.0.15 => 49.0.16
react: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
Expo Workflow: managed

Please specify your device/emulator/simulator platform, model and version

Windows

Error output

No response

Reproducible demo or steps to reproduce from a blank project

expo start

@looney-toon looney-toon added the needs review Issue is ready to be reviewed by a maintainer label Oct 28, 2023
@byCedric
Copy link
Member

Hi @looney-toon! Expo uses the default ANDROID_HOME or ANDROID_SDK_ROOT environment variables. If you define these in your environment, we pick this up automatically (just as normal Android development tools would do).

See https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/platforms/android/AndroidSdk.ts#L22-L49

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants