-
Notifications
You must be signed in to change notification settings - Fork 535
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
[templates] Default $(SupportedOSPlatformVersion)
to 24
.
#9656
Conversation
This "fixes" the issue going forward. Should we also add a warning when Edit: I guess this is part of the #9527 proposal. |
$(SupportedOSPlatformVersion)
to `24.$(SupportedOSPlatformVersion)
to 24
.
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.
If $(SupportedOSPlatformVersion)
is blank, should we also hardcode 24 here?
Lines 35 to 36 in ae63447
<!-- Use $(AndroidMinimumSupportedApiLevel) for $(SupportedOSPlatformVersion) if unset --> <SupportedOSPlatformVersion Condition=" '$(SupportedOSPlatformVersion)' == '' ">$(AndroidMinimumSupportedApiLevel)</SupportedOSPlatformVersion>
My gut feeling is "no", because it makes sense to me that if it isn't set, it should default to the minimum supported, vs. the "minimum recommended". My sense of what makes sense may be completely wrong. Any idea in what scenarios |
This may depend on if we intend to add a warning when targeting |
I think we can take this as-is for now, and follow up with more with: |
* main: Bump to dotnet/sdk@2d6bc4f67d 10.0.100-alpha.1.25060.8 (#9669) [templates] Default `$(SupportedOSPlatformVersion)=24`. (#9656) Bump to dotnet/sdk@a93a592ce9 10.0.100-alpha.1.25056.1 (#9395) LEGO: Pull request (#9667) [tests] use the 'TestName' property (#9664)
Fixes: #9517
Context: dotnet/android-libraries#767
Context: dotnet/android-libraries#767 (comment)
For .NET 10, update the
dotnet new android
template so that$(SupportedOSPlatformVersion)
is 24, bumping from the current default of 21.The reason for this is that "desugaring" "moves" Java methods to locations that we don't expect, which can result in
AbstractMethodError
s at runtime. Setting the minimum SDK version to >= 24 avoids this desugaring step, preventing the Java methods from being moved in a manner we don't expect, and thus avoiding theAbstractMethodError
.Note that 21 will still be the supported minimum for those that need it, however this will keep most users who do not need to support devices that old from having desugaring issues.