android-emulator-runner icon indicating copy to clipboard operation
android-emulator-runner copied to clipboard

Install platforms for the specified api level

Open joshrlesch opened this issue 11 months ago • 0 comments

When using this action in multiple projects that both build and test Android apps on shared self-hosted runners. We are having emulator launch issues because the platform is missing in the Android SDK.

When only building, we use the setup-android action to install the Android SDK. If another test build hits the same self-hosted runner with a cached Android SDK directory, the platforms directory does not get installed by this GH action.

WARNING | platforms subdirectory is missing under /Users/ec2-user/.android/sdk, please install it
  WARNING | invalid sdk root /Users/ec2-user/.android/sdk
  PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/Users/ec2-user/.android/sdk]!
  INFO    | Android emulator version 32.1.15.0 (build_id 10696886) (CL:N/A)
  INFO    | checking ANDROID_HOME for valid sdk root.
  INFO    | checking ANDROID_SDK_ROOT for valid sdk root.
  emulator: WARN: Cannot find valid sdk root from environment variable ANDROID_HOME nor ANDROID_SDK_ROOT,Try to infer from emulator's path
  INFO    | guessed sdk root is /Users/ec2-user/.android/sdk
  emulator: WARN: Cannot find valid sdk root path.

It seems like other people are also running into the same issue, ie -> https://github.com/ReactiveCircus/android-emulator-runner/issues/375

joshrlesch avatar Mar 13 '24 14:03 joshrlesch