Skip to content

.aidl can produce C# NRT warnings #6686

Open
@jonathanpeppers

Description

@jonathanpeppers

This sample: https://github.com/xamarin/monodroid-samples/tree/dotnet/AIDLDemo

Produces build warnings:

obj\Debug\net6.0-android\aidl\IAdditionService.cs(38,27): warning CS8765: Nullability of type of parameter 'reply' doesn't match overridden member (possibly because of nullability attributes). 

Line is:

protected override bool OnTransact (int code, global::Android.OS.Parcel data, global::Android.OS.Parcel reply, int flags)
obj\Debug\net6.0-android\aidl\IAdditionService.cs(26,12): warning CS8603: Possible null reference return.
obj\Debug\net6.0-android\aidl\IAdditionService.cs(27,14): warning CS8600: Converting null literal or possible null value to non-nullable type.

Lines are:

public static Com.Xamarin.Aidldemo.IAdditionService AsInterface (global::Android.OS.IBinder obj)
{
	if (obj == null)
		return null;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: BindingsIssues in Java Library Binding projects.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions