-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Old versions of Android SDK & tools will be removed from images on January, 8 #8952
Comments
In response to actions/runner-images#8952
In response to actions/runner-images#8952
For those who are struggling with this in .NET MAUI, run this command and you're good to go: |
@Alexey-Ayupov @mikhailkoliada somehow we're getting non-predictable results with this. - task: DotNetCoreCLI@2
displayName: Install Android dependencies
inputs:
command: build
projects: "${{ parameters.project }}"
arguments: >
-t:InstallAndroidDependencies
-f:net${{ variables.DOTNET_VERSION }}-android
-p:AcceptAndroidSDKLicenses=True
-p:AndroidSdkPath="/usr/local/lib/android/sdk/"
-o:$(Build.ArtifactStagingDirectory) This does result in a predictable command being run:
However more than half of the time we get a failed run:
and when we get a successful run, this is the log of the task:
|
The error: ``` ERROR: /Users/runner/work/envoy/envoy/mobile/WORKSPACE:98:18: fetching android_sdk_repository rule //external:androidsdk: Android SDK api level 30 was requested but it is not installed in the Android SDK at /Users/runner/Library/Android/sdk. The api levels found were [34, 33, 32, 31]. Please choose an available api level or install api level 30 from the Android SDK Manager. ``` This PR is a workaround to install Android SDK 30 even though it's not used for building iOS apps, that's because mobile/WORKSPACE expects the Android SDK 30 to be available and GitHub Runner image no longer includes Android SDK 30. See actions/runner-images#8952. Passing `--android` in the `./ci/mac_ci_setup.sh` will install the Android SDK 30. Signed-off-by: Fredy Wijaya <fredyw@google.com>
We use Is this temporary because of the migration, or do we need to install adb ourselves? |
Also successed with temporary solution below. - name: Set Up Android tools
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
--sdk_root=$ANDROID_SDK_ROOT \
"platform-tools"
- name: Build
run: |
dotnet build <project> \
-f:net8.0-android |
mobile/ci: Fix iOS_build failures The error: ``` ERROR: /Users/runner/work/envoy/envoy/mobile/WORKSPACE:98:18: fetching android_sdk_repository rule //external:androidsdk: Android SDK api level 30 was requested but it is not installed in the Android SDK at /Users/runner/Library/Android/sdk. The api levels found were [34, 33, 32, 31]. Please choose an available api level or install api level 30 from the Android SDK Manager. ``` This PR is a workaround to install Android SDK 30 even though it's not used for building iOS apps, that's because mobile/WORKSPACE expects the Android SDK 30 to be available and GitHub Runner image no longer includes Android SDK 30. See actions/runner-images#8952. Passing `--android` in the `./ci/mac_ci_setup.sh` will install the Android SDK 30. Signed-off-by: Fredy Wijaya <fredyw@google.com>
For .NET Xamarin, this is what I did for a windows-2022 pipeline to fix it. Add this Command Line task before your Xamarin.Android task - script: |
C:\Android\android-sdk\cmdline-tools\latest\bin\sdkmanager "platforms;android-28"
displayName: 'Install Android API 28' Note: |
I'm sorry. I can't understand what you suggest. This issue mentions that "Android SDKs and tools" are deleted, so no longer available as part of the runner images. That is breaking my Android builds. So, how to install those tools manually to make my Android builds work again? I guess it's a matter of installing it manually, but how? Thank you! |
What's the equivalent in "powershell" so it can run in whatever image? |
@Blue101black I'm not getting any proguard errors, everything runs fine for me @SuperJMN I think in the powershell script you should just be able to run |
@SuperJMN This will not work for you as it's for Windows. According to your error message you use Ubuntu, therefore needing Shell, not PowerShell (and corresponding paths). They did not mention that I never worked with Nuke, but I would assume, that it should look something like this for you:
Just make sure to have |
Thanks, that fixed my Xamarin Android build issue! |
* by installing the necessary Android tools * the errors were caused by a recent change in the runner image, see actions/runner-images#8952
* by installing the necessary Android tools * the errors were caused by a recent change in the runner image, see actions/runner-images#8952
GitHub Actions runner image moved SDK manager per actions/runner-images#8952. Migrate to new location of SDK manager per path listed at actions/runner-images#9146 (comment)
* docs: update places install snippet Don't use a variable in the kotlin bom dependency. * chore: Update build.yml GitHub Actions runner image moved SDK manager per actions/runner-images#8952. Migrate to new location of SDK manager per path listed at actions/runner-images#9146 (comment)
How does this relate to App Center? Does it use the same agent? |
Cleaned up. |
Success with this solution (GitHub Actions)
|
All the sdk version prior to 30 were removed from every runner, now the sdk has to be installed manually actions/runner-images#8952
@shichen85, did you ever receive an answer to your question? I'm also seeing |
I don't think I have gotten a reply. I ended up installing adb myself as many other suggested with something similar to:
|
I would settle with using https://github.com/android-actions/setup-android to avoid future breaks. We also started with the workaround but this is easier and works for different runners (windows and ubuntu). |
Breaking changes
Android SDK & tools v19 through v30 will be removed from Windows 2019 image.
Android SDK & tools v27 through v30 will be removed from Windows 2022 and all Ubuntu and macOS images.
Target date
The images rollout process will start on January 8 and take 3-4 days.
The motivation for the changes
We would like to remove some obsolete versions and free up more disk space on runner agents.
Possible impact
If your workflows or pipelines depend on these older version of components, they may be broken.
Platforms affected
Runner images affected
Mitigation ways
Nothing specific is required. All the components can still be installed using Android's sdkmanager.
The text was updated successfully, but these errors were encountered: