android-emulator-runner
android-emulator-runner copied to clipboard
Warning - Platform tools already installed
I'm seeing this in my runner logs:
Install Android SDK
/bin/sh -c \yes | sdkmanager --licenses > /dev/null
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Installing latest build tools, platform tools, and platform.
/bin/sh -c \sdkmanager --install 'build-tools;33.0.0' platform-tools 'platforms;android-31' > /dev/null
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Installing latest emulator.
/bin/sh -c \sdkmanager --install emulator --channel=0 > /dev/null
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Installing system images.
/bin/sh -c \sdkmanager --install 'system-images;android-31;google_apis;x86_64' --channel=0 > /dev/null
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Warning: Observed package id 'platform-tools' in inconsistent location '/Users/runner/Library/Android/sdk/platform-tools-2' (Expected '/Users/runner/Library/Android/sdk/platform-tools')
Warning: Already observed package id 'platform-tools' in '/Users/runner/Library/Android/sdk/platform-tools'. Skipping duplicate at '/Users/runner/Library/Android/sdk/platform-tools-2'
Indeed it would appear everything that is trying to be installed is already on the runner image https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md#android
Is there a reason we're trying to install them again? Or is there a way to skip this? Thanks.
Maybe similar error
/usr/bin/sh -c \sudo chown $USER:$USER /usr/local/lib/android/sdk -R
/usr/bin/sh -c \yes | sdkmanager --licenses > /dev/null
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Installing latest build tools, platform tools, and platform.
/usr/bin/sh -c \sdkmanager --install 'build-tools;33.0.0' platform-tools 'platforms;android-30' > /dev/null
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Installing latest emulator.
/usr/bin/sh -c \sdkmanager --install emulator --channel=0 > /dev/null
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Installing system images.
/usr/bin/sh -c \sdkmanager --install 'system-images;android-30;android-wear;x86' --channel=0 > /dev/null
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
Warning: Observed package id 'ndk;23.2.8568313' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/23.2.8568313')
From https://github.com/yschimke/rememberwear/actions/runs/3078664216/jobs/4979543909#step:5:15
Can you post your .yml? @mattjohnsonpint Also, I don't know if we can assume the tools are installed on every flavor of runner.
Can you post your .yml?
Sure. https://github.com/getsentry/sentry-dotnet/blob/main/.github/workflows/device-tests.yml
Also, I don't know if we can assume the tools are installed on every flavor of runner.
The runner images and their pre-installed software are listed here: https://github.com/actions/runner-images/blob/main/README.md
@ychescale9 Any downsides to putting a check in before installing the tooling? Suppose we could do that.
Runners already have the SDK tools needed and many people already run the setup-android action before their tests as well.
I can't recall exactly why I did this but it could be something to do with the paths of the preinstalled SDK and the way we install all the tools via the cmdline-tools.
Happy to accept a PR if anyone wants to have a go 😀
I'm also seeing this output on GH Actions using macos-11
Seems like depending on the Java Version the app under test is using, they will need to use either $ANDROID_HOME/tools/ or $ANDROID_HOME/cmdline-tools
So, for this PR we will want to have 2 workflows to test, one with Java 1.8 and one on a higher level, and make sure the appropriate tools are called in both cases.
I'm fairly sure the Github Standard Runners come with sufficient android tooling out of the box, but we can confirm this in the PR.
Note: I did find a discrepancy in the tooling as noted here: https://github.com/ReactiveCircus/android-emulator-runner/discussions/286#discussioncomment-4032351
In our setup, sdkmanager --install system-images;android-26;default;x86_64' alone takes 53 seconds. Is this something that can be reduced?