Regression: incorrect nullability annotations in Xamarin.AndroidX.AppCompat 1.8.0
Los mantenedores suelen responder en 2 días
@jonathanpeppers ya está trabajando en esto.
Desde el 10/10/2026.
- #1559 de @copilot-swe-agent — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 40/100
Línea de trabajo
Start from the reproduction: a new androidlib project referencing Xamarin.AndroidX.AppCompat 1.8.0, where AlertDialog.Builder(null!).Create() emits CS8600 but 1.7.1.4 does not. Compare the nullability annotations on the Java-bound members between the two versions, and check the same for Fragment.GetString. Done means the warnings disappear on 1.8.0 and the annotations match the Java source. The fix probably lives in binding metadata, so the maintainers' guidance on where that lives matters before editing.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Android framework version
net10.0-android
Affected platform version
.NET 10.0.400
Description
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.
Steps to Reproduce
- Create a project:
dotnet new androidlib
dotnet package add '[email protected]'
- Add the following code:
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 buildand 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
Did you find any workaround?
No response
Relevant log output
- Lenguaje dominante
- C#
- Estrellas
- 319
- Forks
- 73
- Merge medio
- 2 d 11 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/android-libraries
-
Unfreeze Xamarin.Firebase.Firestore and Xamarin.Protobuf.JavaLite now that Firebase BoM 35.0.0 fixes the Protolite conflictPosiblemente ocupada @jonathanpeppers la tomó hace 8 días. Abierto
dotnet/android-libraries#1563 · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 20/100
dotnet/android-libraries#1561 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
dotnet/android-libraries#1549 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
dotnet/android-libraries#1503 ·
Los mantenedores suelen responder en 2 días
-
Compose UI.Graphics: SolidColor(long) constructor stripped due to Kotlin @JvmInline value class param (sibling of java-interop#1440 for ctors)Quizá libre de nuevo @jonathanpeppers la tomó hace 132 días y no hay ningún pull request abierto. Abierto
dotnet/android-libraries#1470 · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 2 días
Todos los issues de dotnet/android-libraries
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
KnifeLemon/Filee#363 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
area-Native untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dotnet/machinelearning#7837 ·
Los mantenedores suelen responder en 2 días