Replies: 2 comments
-
|
I talked myself into trying out option 3 in skiptools/skipstone#194 |
Beta Was this translation helpful? Give feedback.
-
|
There are a few reasons for the
There are a variety of possible configurations that make command-line driving of the Android emulator tricky. There are subtle differences in where the emulator images are sought, which can vary based on various configurations: the path to the We can take a look at skiptools/skipstone#194 to try to robustify the process, but if that fails, we may need to revert to the previous advice of just doing it all through Android Studio. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, a few newbies have shown up on Slack reporting that Skip builds are failing, refusing to install to attached devices. I attempted to reproduce these issues in UTM.app.
I wasn't able to reproduce the real issue in UTM, because UTM can't run the Android emulator at all! I ran smack into the "HVF error: HV_UNSUPPORTED" issue.
That affects Github Actions, and it affects Android Studio itself in UTM. (@marcprux I don't suppose you know of a good workaround…?!)
While I was investigating this, I filed these issues:
skip doctor/skip checkupdoesn't attempt to connect to the Android emulator skipstone#186skip android emulator createfails on fresh install skipstone#187skip android emulator listfails on fresh install skipstone#188skip android emulator launchfails if you haven't usedskipto create an emulator skipstone#189I didn't catch any of these in my previous round of UTM testing, because my goal at that time was just to get
skip checkupto pass. It does kinda sorta pass now, except for this issue I filed a while ago:skip doctorshould suggest usingxcode-selectif the command-line tools are selected #609xcode-selecthint if active dev dir is CommandLineTools skipstone#180Once I manually ran
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer,skip checkuppassed, but it passed because of skipstone#186 … it passed because we didn't check the status of the emulator.I'm embarrassed to say that I didn't even know that Skip had a
skip android emulatorcommand, not least because I almost never useskip android, because I normally use Skip Lite exclusively, and do almost all of my builds withxcodebuild, even when I am using Skip Fuse.I feel like we're kinda at a fork in the road about this. I can see four-ish primary approaches:
expo.devdoes.sdkmanagerto ensure that adequate versions ofbuild-toolsandplatformshad been installed, useavdmanagerto ensure that an emulator had been created (and that the emulator was running).dl.google.com, extracts them into a temp directory, and then runs/tmp/cmdline-tools/bin/sdkmanager --sdk_root=$HOME/Library/Android/sdk. (This requires a working macOS JVM like Temurin.) We can run it once with--licensesand then again to install"cmdline-tools;latest", which installs the CLI tools into Android Studio's managed Android home. When it's done, Android Studio's SDK acknowledges that the CLI tools have been installed.This works surprisingly well on Android Studio Panda 1 | 2025.3.1 Patch 1, but it's extremely hacky. It feels like it could break in any minor point release of Android Studio.
android-commandlinetools), then use itssdkmanagerto installemulatorbuild-toolsandplatform-tools, adding them to the PATH ourselves. We'd useavdmanagerto create our own emulator and run it. Android Studio would know nothing about it. (We'd also need to wire up a JVM like Temurin.)I think these approaches are roughly sorted in order of my preference.
Beta Was this translation helpful? Give feedback.
All reactions