Skip to content

Commit ead704c

Browse files
authored
Fix avd path on ubuntu-24.04 - attempt 2 (#415)
1 parent e800fff commit ead704c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
api-level: 34
3636
target: aosp_atd
3737
arch: x86_64
38-
- os: ubuntu-24.04
38+
- os: ubuntu-lastest
3939
api-level: 35
4040
target: google_apis
4141
arch: x86_64
@@ -63,7 +63,7 @@ jobs:
6363
~/.android/avd/*
6464
~/.android/adb*
6565
~/.android/debug.keystore
66-
key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}
66+
key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.arch }}
6767

6868
- uses: gradle/actions/setup-gradle@v4
6969

lib/sdk-installer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
6363
// add paths for commandline-tools and platform-tools
6464
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);
6565
// set standard AVD path
66+
yield io.mkdirP(`${process.env.HOME}/.android/avd`);
6667
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
6768
// accept all Android SDK licenses
6869
yield exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);

src/sdk-installer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
3232
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);
3333

3434
// set standard AVD path
35+
await io.mkdirP(`${process.env.HOME}/.android/avd`);
3536
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
3637

3738
// accept all Android SDK licenses

0 commit comments

Comments
 (0)