Regression: incorrect nullability annotations in Xamarin.AndroidX.AppCompat 1.8.0
Maintainer thường phản hồi trong vòng 2 ngày
@jonathanpeppers đang làm issue này rồi.
Từ ngày 10/10/2026.
- #1559 của @copilot-swe-agent — đã đóng, không merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 40/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C#
- Star
- 319
- Fork
- 73
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/android-libraries
-
Unfreeze Xamarin.Firebase.Firestore and Xamarin.Protobuf.JavaLite now that Firebase BoM 35.0.0 fixes the Protolite conflictCó thể đã có người làm @jonathanpeppers đã nhận 8 ngày trước. Đang mở
dotnet/android-libraries#1563 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
dotnet/android-libraries#1561 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
dotnet/android-libraries#1549 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
dotnet/android-libraries#1503 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Compose UI.Graphics: SolidColor(long) constructor stripped due to Kotlin @JvmInline value class param (sibling of java-interop#1440 for ctors)Có thể làm lại được @jonathanpeppers đã nhận 132 ngày trước và không có pull request nào đang mở. Đang mở
dotnet/android-libraries#1470 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của dotnet/android-libraries
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
KnifeLemon/Filee#363 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
area-Native untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
dotnet/machinelearning#7837 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[CI] .trgen-ignore required for several grammars.Có thể đã có người làm @kaby76 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
antlr/grammars-v4#5073 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement]: Add a search box to the Time Zone dropdownCó thể đã có người làm @idumlupinar đã nhận hôm nay. Đang mởStatus: New
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
dnnsoftware/Dnn.Platform#7579 ·
Maintainer thường phản hồi trong vòng 2 ngày