Skip to content
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

Closed
8 of 9 tasks
mikhailkoliada opened this issue Dec 5, 2023 · 29 comments
Closed
8 of 9 tasks
Assignees
Labels

Comments

@mikhailkoliada
Copy link
Member

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

  • Azure DevOps
  • GitHub Actions

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Mitigation ways

Nothing specific is required. All the components can still be installed using Android's sdkmanager.

@ysmoradi
Copy link

ysmoradi commented Jan 9, 2024

For those who are struggling with this in .NET MAUI, run this command and you're good to go:
dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"

@hansmbakker
Copy link

hansmbakker commented Jan 10, 2024

For those who are struggling with this in .NET MAUI, run this command and you're good to go: dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"

@Alexey-Ayupov @mikhailkoliada somehow we're getting non-predictable results with this.
We configured it like this in Azure DevOps:

      - 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:

/opt/hostedtoolcache/dotnet/dotnet build /home/vsts/work/1/s/./src/MyNamespace.App/MyNamespace.App.csproj -dl:CentralLogger,"/home/vsts/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.232.0/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"/home/vsts/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.232.0/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath=/usr/local/lib/android/sdk/ -o:/home/vsts/work/1/a

However more than half of the time we get a failed run:

/opt/hostedtoolcache/dotnet/dotnet build /home/vsts/work/1/s/./src/MyNamespace.App/MyNamespace.App.csproj -dl:CentralLogger,"/home/vsts/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.232.0/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"/home/vsts/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.232.0/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath=/usr/local/lib/android/sdk/ -o:/home/vsts/work/1/a
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  Restored [several projects - edited] (in 1.08 sec).
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Android.Tooling.targets(70,5): Warning XA5300: The Android SDK directory could not be found. Install the Android SDK by following the instructions at: https://aka.ms/dotnet-android-install-sdk
To use a custom SDK path for a command line build, set the 'AndroidSdkDirectory' MSBuild property to the custom path.
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Android.Tooling.targets(70,5): warning XA5300: The Android SDK directory could not be found. Install the Android SDK by following the instructions at: https://aka.ms/dotnet-android-install-sdk [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Android.Tooling.targets(70,5): warning XA5300: To use a custom SDK path for a command line build, set the 'AndroidSdkDirectory' MSBuild property to the custom path. [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/targets/Microsoft.Android.Sdk.Tooling.targets(31,5): Warning XARAT7003: System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
   at System.ArgumentNullException.Throw(String paramName)
   at System.IO.Path.Combine(String path1, String path2, String path3)
   at Xamarin.Android.Tasks.ResolveAndroidTooling.RunTask()
   at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /mnt/vss/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/targets/Microsoft.Android.Sdk.Tooling.targets(31,5): warning XARAT7003: System.ArgumentNullException: Value cannot be null. (Parameter 'path1') [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/targets/Microsoft.Android.Sdk.Tooling.targets(31,5): warning XARAT7003:    at System.ArgumentNullException.Throw(String paramName) [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/targets/Microsoft.Android.Sdk.Tooling.targets(31,5): warning XARAT7003:    at System.IO.Path.Combine(String path1, String path2, String path3) [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/targets/Microsoft.Android.Sdk.Tooling.targets(31,5): warning XARAT7003:    at Xamarin.Android.Tasks.ResolveAndroidTooling.RunTask() [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/targets/Microsoft.Android.Sdk.Tooling.targets(31,5): warning XARAT7003:    at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /mnt/vss/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25 [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
##[error]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): Error MSB4044: The "InstallAndroidDependencies" task was not given a value for the required parameter "AndroidSdkPath".
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): error MSB4044: The "InstallAndroidDependencies" task was not given a value for the required parameter "AndroidSdkPath". [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]

Build FAILED.

and when we get a successful run, this is the log of the task:

/opt/hostedtoolcache/dotnet/dotnet build /home/vsts/work/1/s/./src/MyNamespace.App/MyNamespace.App.csproj -dl:CentralLogger,"/home/vsts/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.232.0/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"/home/vsts/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.232.0/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath=/usr/local/lib/android/sdk/ -o:/home/vsts/work/1/a
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  Restored [several projects - edited] (in 1.08 sec).
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): Warning : Android component "tools" is obsolete, please install "cmdline-tools"
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Android component "tools" is obsolete, please install "cmdline-tools" [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): Warning : Trying to fallback to "tools"...
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Trying to fallback to "tools"... [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): Warning : Dependency `platforms;android-34` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-34"`
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Dependency `platforms;android-34` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-34"` [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): Warning : Dependency `build-tools;34.0.0` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "build-tools;34.0.0"`
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Dependency `build-tools;34.0.0` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "build-tools;34.0.0"` [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
##[warning]/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): Warning : Dependency `platform-tools` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "platform-tools"`
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Dependency `platform-tools` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "platform-tools"` [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]

Build succeeded.

/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Android component "tools" is obsolete, please install "cmdline-tools" [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Trying to fallback to "tools"... [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Dependency `platforms;android-34` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-34"` [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Dependency `build-tools;34.0.0` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "build-tools;34.0.0"` [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
/opt/hostedtoolcache/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.52/tools/Xamarin.Installer.Common.targets(12,3): warning : Dependency `platform-tools` should have been installed but could not be resolved. You can attempt to install it with: `/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --install "platform-tools"` [/home/vsts/work/1/s/src/MyNamespace.App/MyNamespace.App.csproj::TargetFramework=net8.0-android]
    5 Warning(s)
    0 Error(s)

Time Elapsed 00:00:05.67
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
Finishing: Install Android dependencies

fredyw added a commit to fredyw/envoy that referenced this issue Jan 10, 2024
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>
@shichen85
Copy link

| Android SDK Platform-Tools | 34.0.5 |
mentioned that platform tools 34.0.5 is included in this image.

We use /usr/local/lib/android/sdk/platform-tools/adb, and I see that version 34.0.5 still has it in the platform-tools dir, but now we are getting the error
System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/usr/local/lib/android/sdk/platform-tools/adb' with working directory '/home/runner/work/out'. No such file or directory

Is this temporary because of the migration, or do we need to install adb ourselves?

@DosangGu
Copy link

For those who are struggling with this in .NET MAUI, run this command and you're good to go: dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"

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

abeyad pushed a commit to envoyproxy/envoy that referenced this issue Jan 11, 2024
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>
@Blue101black
Copy link

Blue101black commented Jan 11, 2024

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: C:\Program Files (x86)\Android\android-sdk\tools directory was removed it seems and has produced another issue where I get a runtime crash error (see my second comment further down)

@cjp666
Copy link

cjp666 commented Jan 16, 2024

@Blue101black you are a star, thank you

Adding

  • script: |
    C:\Android\android-sdk\cmdline-tools\latest\bin\sdkmanager "platforms;android-29"
    displayName: 'Install Android API 29'

As the step before my XamarinAndroid@1 step sorted it for me

Need to run it now and see if there are any proguard errors

@SuperJMN
Copy link

@SuperJMN The path to the SDK is /usr/local/lib/android/sdk, you should be able to call it also there as Shell command:

/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root=/usr/local/lib/android/sdk "platform-tools"

I also find it frustrating that Android builds have some more dependencies not dealt with by the workload. There is a dotnet global tool that helps with setting up prequisites that we use on our machines. But was not necessary on the runners so far: https://github.com/Redth/dotnet-maui-check

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!

@SuperJMN
Copy link

@Blue101black you are a star, thank you

Adding

  • script: |
    C:\Android\android-sdk\cmdline-tools\latest\bin\sdkmanager "platforms;android-29"
    displayName: 'Install Android API 29'

As the step before my XamarinAndroid@1 step sorted it for me

Need to run it now and see if there are any proguard errors

What's the equivalent in "powershell" so it can run in whatever image?
Thanks!

@cjp666
Copy link

cjp666 commented Jan 16, 2024

@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
C:\Android\android-sdk\cmdline-tools\latest\bin\sdkmanager.exe "platforms;android-29"

@Falco20019
Copy link

Falco20019 commented Jan 16, 2024

@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 Android SDKs and tools are removed. Only OLD are removed. But they seem to have also deleted one of the tools accidentally (platform-tools) which is needed by most of us... So the only thing missing for you is to install them.

I never worked with Nuke, but I would assume, that it should look something like this for you:

    Target RestoreAndroidPlatformTools => td => td
        .Executes(() =>
        {
            StartShell(@"/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root=/usr/local/lib/android/sdk \"platform-tools\"").AssertZeroExitCode();
        });

Just make sure to have RestoreAndroidPlatformTools as dependency before you try to run your build. That's what I tried to tell you at #8952 (comment) but due to writing from my smartphone, giving you a full example was hard.

@TeemuToivanen
Copy link

@Blue101black you are a star, thank you

Adding

  • script: |
    C:\Android\android-sdk\cmdline-tools\latest\bin\sdkmanager "platforms;android-29"
    displayName: 'Install Android API 29'

As the step before my XamarinAndroid@1 step sorted it for me

Need to run it now and see if there are any proguard errors

Thanks, that fixed my Xamarin Android build issue!

janusw added a commit to janusw/dotnet-bluetooth-le that referenced this issue Jan 17, 2024
* by installing the necessary Android tools
* the errors were caused by a recent change in the runner image,
  see actions/runner-images#8952
janusw added a commit to janusw/dotnet-bluetooth-le that referenced this issue Jan 17, 2024
* by installing the necessary Android tools
* the errors were caused by a recent change in the runner image,
  see actions/runner-images#8952
wangela added a commit to googlemaps-samples/android-places-demos that referenced this issue Jan 17, 2024
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)
wangela added a commit to googlemaps-samples/android-places-demos that referenced this issue Jan 18, 2024
* 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)
@saied20
Copy link

saied20 commented Jan 23, 2024

How does this relate to App Center? Does it use the same agent?
I noticed builds with Android sdk < 31 don't work there as well.

@mikhailkoliada
Copy link
Member Author

Cleaned up.

@sergeylv9
Copy link

sergeylv9 commented Jan 25, 2024

Success with this solution (GitHub Actions)

- name: Setup Android SDK 27, 28, 29 and 30
      uses: android-actions/setup-android@v3
      with:
        cmdline-tools-version: 9123335
    - run: sdkmanager tools "platforms;android-27" "platforms;android-28" "platforms;android-29" "platforms;android-30"

ericsink added a commit to ericsink/SQLitePCL.raw that referenced this issue Feb 5, 2024
edo9300 added a commit to ProjectIgnis/windbot that referenced this issue Feb 16, 2024
All the sdk version prior to 30 were removed from every runner, now the sdk has to be installed manually
actions/runner-images#8952
@StephenWithPH
Copy link

Is this temporary because of the migration, or do we need to install adb ourselves?

@shichen85, did you ever receive an answer to your question?

I'm also seeing /usr/local/lib/android/sdk/platform-tools/adb: No such file or directory .

@shichen85
Copy link

Is this temporary because of the migration, or do we need to install adb ourselves?

@shichen85, did you ever receive an answer to your question?

I'm also seeing /usr/local/lib/android/sdk/platform-tools/adb: No such file or directory .

I don't think I have gotten a reply. I ended up installing adb myself as many other suggested with something similar to:

      - name: Set Up Android tools (non-windows runner only)
        if: ${{ !startswith(inputs.runner, 'windows') }}
        run: |
          ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
          --sdk_root=$ANDROID_SDK_ROOT \
          "platform-tools"

@Falco20019
Copy link

Is this temporary because of the migration, or do we need to install adb ourselves?

@shichen85, did you ever receive an answer to your question?

I'm also seeing /usr/local/lib/android/sdk/platform-tools/adb: No such file or directory .

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests