Skip to content

Commit e1abc64

Browse files
[ci] clean $(Agent.TempDirectory)/android-sdk (#1281)
Builds are randomly failing with: Found corrupted package.xml at D:\a\_work\_temp\android-sdk\platforms\android-36\package.xml Observed package id 'cmdline-tools;19.0' in inconsistent location 'D:\a\_work\_temp\android-sdk\cmdline-tools\latest' (Expected 'D:\a\_work\_temp\android-sdk\cmdline-tools\19.0') Already observed package id 'cmdline-tools;19.0' in 'D:\a\_work\_temp\android-sdk\cmdline-tools\19.0'. Skipping duplicate at 'D:\a\_work\_temp\android-sdk\cmdline-tools\latest' Let's delete the folder on each run to ensure a clean state.
1 parent 3d3cc2d commit e1abc64

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

build/ci/setup-environment.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ steps:
7070
jdkArchitectureOption: 'x64'
7171
jdkSourceOption: 'PreInstalled'
7272

73+
- pwsh: |
74+
if (Test-Path "${{ parameters.androidSdkRoot }}") {
75+
Remove-Item "${{ parameters.androidSdkRoot }}" -Recurse -Force
76+
}
77+
New-Item -ItemType Directory -Path "${{ parameters.androidSdkRoot }}" -Force
78+
displayName: Clean and create Android SDK directory
79+
condition: eq(${{ parameters.installAndroidDependencies }}, true)
80+
7381
- task: DotNetCoreCLI@2
7482
displayName: Install android dependencies GoogleV2
7583
inputs:

0 commit comments

Comments
 (0)