dotnet / dotnet/android

.aidl can produce C# NRT warnings

Open
#6,686 1 comment 0 reactions 0 assignees View on GitHub
Area: Bindings
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 20h
Merged PRs (30d)
257

Description

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:
```csharp
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:
```csharp
public static Com.Xamarin.Aidldemo.IAdditionService AsInterface (global::Android.OS.IBinder obj)
{
if (obj == null)
return null;
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.