-
Notifications
You must be signed in to change notification settings - Fork 31
[Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 #169
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 7, 2022
Context: dotnet/android-tools#169 Does It Build™?
Contributor
Author
|
Do not merge until dotnet/android#7073 is green. |
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 8, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Remove support for `dx` and ProGuard. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Remove all support for `dx`, as it cannot be used. Remove all support for ProGuard, as it could only be used with `dx`; trying to use `d8` with ProGuard results in an XA1011 error. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 8, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Remove support for `dx` and ProGuard. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Remove all support for `dx`, as it cannot be used. Remove all support for ProGuard, as it could only be used with `dx`; trying to use `d8` with ProGuard results in an XA1011 error. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 9, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Remove support for `dx` and ProGuard. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Remove all support for `dx`, as it cannot be used. Remove all support for ProGuard, as it could only be used with `dx`; trying to use `d8` with ProGuard results in an XA1011 error. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 9, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 9, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Commit xamarin/xamarin-android-tools@TODO_HASH *also* bumps `$(AndroidCommandLineToolsVersion)` to 7.0. Update `$(CommandLineToolsVersion)` in `Configuration.props` accordingly. The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1], which introduces a new `lint` check called `RedundantLabel`: > Redundant label on activity in manifest meaning that the `//actviity/@android:label` value is identical to the `//application/@android:label` value, and thus isn't needed. This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`: obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102: Redundant label can be removed [RedundantLabel] For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore `RedundantLabel` warnings. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html [1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 9, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Commit xamarin/xamarin-android-tools@TODO_HASH *also* bumps `$(AndroidCommandLineToolsVersion)` to 7.0. Update `$(CommandLineToolsVersion)` in `Configuration.props` accordingly. The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1], which introduces a new `lint` check called `RedundantLabel`: > Redundant label on activity in manifest meaning that the `//actviity/@android:label` value is identical to the `//application/@android:label` value, and thus isn't needed. This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`: obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102: Redundant label can be removed [RedundantLabel] For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore `RedundantLabel` warnings. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html [1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
248a036 to
7375063
Compare
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 11, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Commit xamarin/xamarin-android-tools@TODO_HASH *also* bumps `$(AndroidCommandLineToolsVersion)` to 7.0. Update `$(CommandLineToolsVersion)` in `Configuration.props` accordingly. The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1], which introduces a new `lint` check called `RedundantLabel`: > Redundant label on activity in manifest meaning that the `//actviity/@android:label` value is identical to the `//application/@android:label` value, and thus isn't needed. This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`: obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102: Redundant label can be removed [RedundantLabel] For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore `RedundantLabel` warnings. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html [1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
9f99fb0 to
7f86290
Compare
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 13, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Commit xamarin/xamarin-android-tools@TODO_HASH *also* bumps `$(AndroidCommandLineToolsVersion)` to 7.0. Update `$(CommandLineToolsVersion)` in `Configuration.props` accordingly. The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1], which introduces a new `lint` check called `RedundantLabel`: > Redundant label on activity in manifest meaning that the `//actviity/@android:label` value is identical to the `//application/@android:label` value, and thus isn't needed. This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`: obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102: Redundant label can be removed [RedundantLabel] For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore `RedundantLabel` warnings. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html [1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 14, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Commit xamarin/xamarin-android-tools@TODO_HASH *also* bumps `$(AndroidCommandLineToolsVersion)` to 7.0. Update `$(CommandLineToolsVersion)` in `Configuration.props` accordingly. The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1], which introduces a new `lint` check called `RedundantLabel`: > Redundant label on activity in manifest meaning that the `//actviity/@android:label` value is identical to the `//application/@android:label` value, and thus isn't needed. This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`: obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102: Redundant label can be removed [RedundantLabel] For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore `RedundantLabel` warnings. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html [1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: dotnet/android@e4b3adb Update the preferred Android SDK component versions to the current latest versions listed in the [Android Repository file][0]: * `$(AndroidSdkBuildToolsVersion)`/build-tools to 32.0.0 * `$(AndroidSdkPlatformToolsVersion)`/platform-tools to 32.0.0 * `$(AndroidSdkPlatformVersion)`/platform to android-32 * `$(AndroidCommandLineToolsVersion)`/cmdline-tools to 7.0 * `$(AndroidNdkVersion)`/NDK to 23.2.8568313 [0]: https://dl-ssl.google.com/android/repository/repository2-3.xml
Context: dotnet/android#7073 (comment) I *think* this will fix `InstallAndroidDependenciesTest()`.
Context? https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml Trying to use either NDK 23.2.8568313 or 21.4.7075529 results in lots of unit test failures, none of which actually make sense: [CC] "C:\a\_work\1\a\TestRelease\06-11_16.01.37\temp\SDK Ümläüts\ndk\toolchains\llvm\prebuilt\windows-x86_64\bin\armv7a-linux-androideabi19-clang.CMD" -c -D__ANDROID_API__=19 -DANDROID -o obj\Release\bundles\armeabi-v7a\temp.o -I "C:\a\_work\1\a\TestRelease\06-11_16.01.37\temp\SDK Ümläüts\ndk\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include\arm-linux-androideabi" -I "C:\a\_work\1\a\TestRelease\06-11_16.01.37\temp\SDK Ümläüts\ndk\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include" obj\Release\bundles\armeabi-v7a\temp.c (TaskId:259) [cc stderr] 'C:\a\_work\1\a\TestRelease\06-11_16.01.37\temp\SDK' is not recognized as an internal or external command, (TaskId:259) [cc stderr] operable program or batch file. (TaskId:259) NDK 21.4.7075529 *does* have `toolchains/llvm/prebuilt/windows-x86_64/bin/armv7a-linux-androideabi19-clang.cmd`, so I'm not sure why this would fail? `readelf` also can't be found? Nothing makes sense. Revert the NDK change, see if that fixes the tests. (I currently expect it to *not* fix the failures, and that something else is going wrong, but…)
This reverts commit 7f86290. Context: actions/runner-images@2950cbf Context: https://github.com/actions/virtual-environments/blob/9cf1ebd754807fba137c8ce9fa2140311609fdd6/images/win/Windows2022-Readme.md wrt 7f86290, the problems observed weren't due to the NDK version, it was due inadvertently building on an updated VM Image which set NDK r24 as `$(ANDROID_NDK_LATEST_HOME)`, which had unanticipated breakages. Set `$(AndroidNdkVersion)`=23.2.8568313, which is also the default GitHub Actions `$(ANDROID_NDK_HOME)` default version.
build-tools 33.0.0 is the current latest version. Try that.
Now that we've figured out the NDK failures on xamarin-android, let's try latest.
d800d07 to
da5e26f
Compare
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jun 15, 2022
Context: dotnet/android-tools#169 Context: https://dl-ssl.google.com/android/repository/repository2-3.xml Context: 22bc14b Turn XA1023 into an error. Commit xamarin/xamarin-android-tools@TODO_HASH bumps `$(AndroidSdkBuildToolsVersion)` to 32.0.0, which was the latest non- preview `build-tools` package version on 2022-06-06. The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the default version for years. Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+), as we saw no reason to support `dx` in .NET 5 when it was already deprecated. Warning XA1023 has been emitted in Classic Xamarin.Android since Visual Studio 16.9 (released 2021-Mar); we feel there has been ample time to migrate away from `dx` and to the replacement of `d8`. Turn XA1023 into an *error* for Classic Xamarin.Android builds, ensuring things are consistent between Classic Xamarin.Android and .NET 6+. Commit xamarin/xamarin-android-tools@TODO_HASH *also* bumps `$(AndroidCommandLineToolsVersion)` to 7.0. Update `$(CommandLineToolsVersion)` in `Configuration.props` accordingly. The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1], which introduces a new `lint` check called `RedundantLabel`: > Redundant label on activity in manifest meaning that the `//actviity/@android:label` value is identical to the `//application/@android:label` value, and thus isn't needed. This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`: obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102: Redundant label can be removed [RedundantLabel] For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore `RedundantLabel` warnings. TODO: Remove support for `dx` and ProGuard. [0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html [1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
33.0.0 causes issues w/ multidex, as it doesn't contain `mainDexClasses.rules`, which results in unit test failures as d8 fails. Go back to 32.0.0.
| "23.1.7779620", | ||
| "24.0.8215888", | ||
| }; | ||
| string expectedVersion = "23.1.7779620"; |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to update this number to fix the test?
Ndk_MultipleNdkVersionsInSdk
AndroidNdkPath not found inside sdk!
String lengths are both 77. Strings differ at index 66.
Expected: "...nistrator\AppData\Local\Temp\tmp51D5.tmp\sdk\ndk\23.1.7779620"
But was: "...nistrator\AppData\Local\Temp\tmp51D5.tmp\sdk\ndk\24.0.8215888"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml
Context: dotnet/android@e4b3adb
Update the preferred Android SDK component versions to the current latest
versions listed in the Android Repository file:
$(AndroidSdkBuildToolsVersion)/build-tools to 32.0.0$(AndroidSdkPlatformToolsVersion)/platform-tools to 32.0.0$(AndroidSdkPlatformVersion)/platform to android-32$(AndroidCommandLineToolsVersion)/cmdline-tools to 7.0$(AndroidNdkVersion)/NDK to 23.2.8568313