Skip to content

Commit a5194e9

Browse files
committed
[Xamarin.Android.Tools.AndroidSdk] Downgrade build-tools to API-30
Context: https://developer.android.com/studio/releases/build-tools Context: https://dl-ssl.google.com/android/repository/repository2-1.xml Commit 440e6be bumped `$(AndroidSdkBuildToolsVersion)` to 31.0.0, which seemed reasonable at the time…until we tried to actually build xamarin-android against build-tools 31.0.0, which promptly failed: COMPILETODALVIK : error : Unable to access jarfile /Users/runner/Library/Android/sdk/build-tools/31.0.0/lib/dx.jar Turns Out™ that the Android SDK Build-tools package dropped `dx.jar`: % curl -o repo.xml https://dl-ssl.google.com/android/repository/repository2-1.xml % xpath -q -e '//remotePackage[@path="build-tools;31.0.0"]/archives/archive[host-os="macosx"]/complete/url' repo.xml <url>d32e21a8aa8492ef8b86a489f601da425842b5da.build-tools_r31-macosx.zip</url> % curl -o x.zip https://dl-ssl.google.com/android/repository/d32e21a8aa8492ef8b86a489f601da425842b5da.build-tools_r31-macosx.zip % unzip -l x.zip | grep dx.jar # no match There's (currently) no mention of this removal at the Android [SDK Build Tools release notes][0] page, nor is there an explicit mention that `dx` is *obsolete*… Regardless, Xamarin.Android still supports the use of `dx`, and doesn't generate any warning messages about it being obsolete. Thus, in the meantime, continue to use/prefer `$(AndroidSdkBuildToolsVersion)`=30.0.3, which *does* contain `dx.jar`. [0]: https://web.archive.org/web/20210608191407/https://developer.android.com/studio/releases/build-tools
1 parent 440e6be commit a5194e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
If this file is changed the submodule for androidtools should be updated,
1010
along with any other repo which references androidtools.
1111
-->
12-
<AndroidSdkBuildToolsVersion Condition="'$(AndroidSdkBuildToolsVersion)' == ''">31.0.0</AndroidSdkBuildToolsVersion>
12+
<AndroidSdkBuildToolsVersion Condition="'$(AndroidSdkBuildToolsVersion)' == ''">30.0.3</AndroidSdkBuildToolsVersion>
1313
<AndroidCommandLineToolsVersion Condition=" '$(AndroidCommandLineToolsVersion)' == '' ">5.0</AndroidCommandLineToolsVersion>
1414
<AndroidSdkPlatformToolsVersion Condition="'$(AndroidSdkPlatformToolsVersion)' == ''">31.0.3</AndroidSdkPlatformToolsVersion>
1515
<AndroidSdkEmulatorVersion Condition="'$(AndroidSdkEmulatorVersion)' == ''"></AndroidSdkEmulatorVersion>

0 commit comments

Comments
 (0)