expo / expo/orbit

Orbit does not recognize the new Android SDK's default path

Open
#245 8 comments 0 reactions 0 assignees View on GitHub
needs review
Dominant language
TypeScript
Stars
875
Forks
73
Avg merge
8h 42m
Merged PRs (30d)
3

Description

### Summary

# Main bug
Orbit on CachyOS Linux (Arch based distro) will only recognize the old Android SDK path of `~/Android/Sdk` and not the new default Android Studio seems to install to of `~/Android/sdk`. This is similar to the issue I found on expo-cli in [this issue](https://github.com/expo/expo/issues/34548) in the expo/expo repo.

## Extra details
Immediately after installing Expo Orbit and launching it I got a pop-up error telling me I did not have the Android SDK installed or that I needed to use `ANDROID_HOME` env variable (and possibly a different env variable, but I do not remember) to specify the path. When I got past the pop-up, Orbit gave its drop-down (see picture below) did not have any emulators and showed a warning icon (it had a triangle warning on the right side).

![Image](https://github.com/user-attachments/assets/e4cde70f-b1e2-4bff-bea7-4cc236775872)

Pop-up when you click on the triangle warning icon

![Image](https://github.com/user-attachments/assets/a492c7a6-b332-4eb4-9cbe-662046be2b8d)

Normal pop-up behavior once I have the old path
![Image](https://github.com/user-attachments/assets/c52035d0-c12d-4867-832f-52a711820678)

## Related bug
It seems Orbit will not correctly see the `ANDROID_HOME` env variable, either.

### Steps to reproduce

# On CachyOS Linux
## Install from rpm file in expo/orbit releases
Followed [this guide](https://www.baeldung.com/linux/install-rpm-arch-based-distros)
1. Install `rpm` with `sudo pacman -Syu rpm-tools`
2. Make a temp directory for build files with `mkdir -p tmp/orbit`
3. Move into the directory with `cd temp/orbit`
4. Get the latest rpm release for Orbit with `curl -L "https://github.com/expo/orbit/releases/download/expo-orbit-v2.0.1/expo-orbit-2.0.1-1.x86_64.rpm" -o expo-orbit-2.0.1-1.x86_64.rpm`
5. Make a build file named `PKGBUILD` in the `tmp/orbit` directory (the one I made is shown below)
```
pkgname=expo-orbit
pkgver=2.0.1
pkgrel=1
pkgdesc="Accelerate your development workflow with one-click build launches and simulator management"
arch=('x86_64')

depends=()
optdepends=()

source=("expo-orbit-2.0.1-1.x86_64.rpm")

sha256sums=('SKIP')

package() {
find $srcdir/ -mindepth 1 -maxdepth 1 -type d | xargs cp -r -t "$pkgdir"
}
```
6. Make package with `makepkg -si`
7. Check the package was made correctly with `ls -l /usr/bin/expo-orbit` --> Should give output like `-rwxr-xr-x 1 root root 55223672 Jun 21 21:39 /usr/bin/expo-orbit`
## Running Expo Orbit
8. Open Expo Orbit application
9. See pop-up complaining Android SDK not installed <-- I believe, but I cannot reproduce currently
10. Click "Okay" option (or the like)
11. Click Expo Orbit icon in system try
12. See warning icon that adb is not installed
13. Click the triangle warning sign on the right of "Android" to see instructions to install `adb` globally or use the `ANDROID_HOME` env variable
## To get it working
14. Open file explorer or terminal
15. Navigate to the default Android SDK location (currently `~/Android/sdk`)
16. Rename the directory to the old default Android SDK location of `~/Android/Sdk`
17. Open Android Studio
18. Click "Cancel" when Android Studio complains with a pop-up about "Missing SDK"
19. Click "Okay" when a warning about exiting the setup wizard comes up
20. Click "More Actions"
21. Click "SDK Manager"
22. At the top, click "Edit" to choose the new SDK location
![Image](https://github.com/user-attachments/assets/f1514eb4-a02d-4e70-a7ee-53b90306ad36)
23. Click the "Folder" icon to get a pop-up to select the directory.
![Image](https://github.com/user-attachments/assets/92e7456e-083d-44a0-9551-7cf8ddbfc132)
24. Select the new SDK location `~/Android/Sdk` (sometimes it takes a moment to load the new directory)
25. Follow the prompts to finalize registering the new SDK location
26. Click the Expo Orbit icon in the system tray (usually it will update automatically, but if not try quitting and reopening Expo Orbit)

### Environment

`npx expo-env-info`
```Console
expo-env-info 1.2.2 environment info:
System:
OS: Linux 6.13 CachyOS Linux
Shell: 3.7.1 - /bin/fish
Binaries:
Node: 22.13.1 - /run/user/1000/fnm_multishells/19331_1739984372697/bin/node
Yarn: 1.22.22 - /run/user/1000/fnm_multishells/19331_1739984372697/bin/yarn
npm: 11.1.0 - /run/user/1000/fnm_multishells/19331_1739984372697/bin/npm
IDEs:
Android Studio: AI-242.23726.103.2422.13016713
```

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Reproduce the Linux setup and trace Android SDK discovery, including the `~/Android/sdk` path and `ANDROID_HOME`; done means Orbit recognizes the SDK and lists Android emulators without the warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
devtools, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.