You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: incorrect nullability annotations in Xamarin.AndroidX.AppCompat 1.8.0 #1558
Xamarin.AndroidX.AppCompat used to have correct C# nullability annotations in version 1.7.1.4, but they're gone in version 1.8.0, resulting in numerous build warnings.
This is not an isolated incident; A similar regression exists for the latest version of AndroidX.Fragment.App (e.g. in Fragment.GetString). My guess is the nullable annotations are not being properly bound from Java.
public class Class1
{
public void X()
{
AndroidX.AppCompat.App.AlertDialog dialog = new AndroidX.AppCompat.App.AlertDialog.Builder(null!).Create();
// Code is valid because the return value of Create() is non-null
}
}
dotnet build and observe the build warnings:
Class1.cs(9,53): warning CS8600: Converting null literal or possible null value to non-nullable type.
Downgrade to 1.7.1.4 and observe the warnings are gone
It's the same kind of problem, though my issue is about the worsening of the existing state - classes which used to be annotated correctly in previous versions.
Activity
Cheesebaron commentedon Oct 23, 2026
Same in Xamarin.AndroidX.Fragment 1.9.0 and Xamarin.AndroidX.ConstraintLayout 2.2.2.
I reported something similar last year: #1136 which I am not sure has been addressed and I believe the issue reported here is a duplicate of that.
Bip901 commentedon Oct 23, 2026
It's the same kind of problem, though my issue is about the worsening of the existing state - classes which used to be annotated correctly in previous versions.
Cheesebaron commentedon Nov 11, 2026
This is also an issue when targeting
net11.0-android. So I don't believe the backport that mentions this ticket solves it alone? @jonathanpeppersjonathanpeppers commentedon Nov 11, 2026
net11.0-androidin your app wouldn't matter this repo is building w/net10.0-android.We will need to ship the commit above in a service release, before this repo can be updated and rebuild w/ a newer .NET 10 Android.