dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.92k stars 525 forks source link

Updating to version 5.0.0.2612 yields warning "R8 : warning : Missing class androidx.appcompat.graphics.drawable.DrawableWrapper" #9125

Open skuskusku opened 2 months ago

skuskusku commented 2 months ago

Android framework version

Other

Affected platform version

VS2022 17.10.3 targeting Android SDK 34

Description

Hello everyone,

I am trying to give our XF app a last upgrade before we dive into .Net MAUI with it. So I updated the Xamarin.Forms package to something higher than before (it was 5.0.0.2578) e.g. to 5.0.0.2612. If I do that, I get a warning during build:

"R8 : warning : Missing class androidx.appcompat.graphics.drawable.DrawableWrapper (referenced from: void com.google.android.material.shadow.ShadowDrawableWrapper.(android.content.Context, android.graphics.drawable.Drawable, float, float, float) and 3 other contexts)"

is this something I have to worry about? My app seems to run fine though.

If this is the wrong place to ask this question, please guide me where it would suit better.

Any help appreciated,

-- Stefan

Steps to Reproduce

  1. Use an existing XF project using XF version 5.0.0.2578
  2. Update to XF 5.0.0.2612 or higher
  3. Build the android project
  4. Observe the warning during build

Did you find any workaround?

I have reverted to XF 5.0.0.2578

Relevant log output

2>R8 : warning : Missing class androidx.appcompat.graphics.drawable.DrawableWrapper (referenced from: void com.google.android.material.shadow.ShadowDrawableWrapper.<init>(android.content.Context, android.graphics.drawable.Drawable, float, float, float) and 3 other contexts)
jonathanpeppers commented 1 day ago

The class it's warning about is deprecated:

I suspect if something tried to call the missing class, you'd get a Java runtime exception.

If this is a Xamarin.Forms app you are migrating, I would ignore the message and let us know if you see it with .NET MAUI.

dotnet-policy-service[bot] commented 1 day ago

Hi @skuskusku. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.