Skip to content

Paint.Color is attributed with [SupportedOSPlatform("android29.0")] causing warnings in Maui #6962

@buyaa-n

Description

@buyaa-n

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.)

Affected platform version

Mono.Android.dll 31.0.101-preview.11.117

Description

Paint.Color setter is annotated with [SupportedOSPlatform("android29.0")]
image
which causing false positive warning for each call of the API, from the PR review comment setColor(int) was added in API 1 and then they added a long overload in API 29.

Steps to Reproduce

  1. Open a project where CA1416 is enabled
  2. Try set a Color for Paint
   var paint = new Paint();
   paint.Color = _endColor;
  1. See CA1416 warning

Did you find any workaround?

No response

Relevant log output

No response

CC @PureWeen

Metadata

Metadata

Assignees

Labels

Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions