Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mchisolm0 opened this issue Feb 19, 2025 · 3 comments
Open

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

mchisolm0 opened this issue Feb 19, 2025 · 3 comments

Comments

@mchisolm0
Copy link

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 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

Pop-up when you click on the triangle warning icon

Image

Normal pop-up behavior once I have the old path
Image

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

  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"
}
  1. Make package with makepkg -si
  2. 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

  1. Open Expo Orbit application
  2. See pop-up complaining Android SDK not installed <-- I believe, but I cannot reproduce currently
  3. Click "Okay" option (or the like)
  4. Click Expo Orbit icon in system try
  5. See warning icon that adb is not installed
  6. 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

  1. Open file explorer or terminal
  2. Navigate to the default Android SDK location (currently ~/Android/sdk)
  3. Rename the directory to the old default Android SDK location of ~/Android/Sdk
  4. Open Android Studio
  5. Click "Cancel" when Android Studio complains with a pop-up about "Missing SDK"
  6. Click "Okay" when a warning about exiting the setup wizard comes up
  7. Click "More Actions"
  8. Click "SDK Manager"
  9. At the top, click "Edit" to choose the new SDK location
    Image
  10. Click the "Folder" icon to get a pop-up to select the directory.
    Image
  11. Select the new SDK location ~/Android/Sdk (sometimes it takes a moment to load the new directory)
  12. Follow the prompts to finalize registering the new SDK location
  13. 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

  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
@wodin
Copy link

wodin commented Feb 20, 2025

By the way, I haven't tried this, but I suspect the following workaround will fix it too:

$ cd ~/Android
$ ln -s sdk Sdk

@mchisolm0
Copy link
Author

I think you are right. That should also work.

@mchisolm0
Copy link
Author

By the way, I haven't tried this, but I suspect the following workaround will fix it too:

$ cd ~/Android
$ ln -s sdk Sdk

I have confirmed this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants