Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ShadowDrawableWrapper] Proguard complains it can't find DrawableWrapper class from AppCompat #3374

Closed
alexjlockwood opened this issue May 4, 2023 · 0 comments
Assignees

Comments

@alexjlockwood
Copy link
Contributor

Description: When I use material-components-android 1.8.0 and AppCompat 1.6.1, I will get the following proguard error:

Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find superclass or interface androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced method 'android.graphics.drawable.Drawable getWrappedDrawable()' in program class com.google.android.material.shadow.ShadowDrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced method 'android.graphics.Rect getBounds()' in program class com.google.android.material.shadow.ShadowDrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced method 'void invalidateSelf()' in program class com.google.android.material.shadow.ShadowDrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapperUse --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find superclass or interface androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced method 'android.graphics.drawable.Drawable getWrappedDrawable()' in program class com.google.android.material.shadow.ShadowDrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced method 'android.graphics.Rect getBounds()' in program class com.google.android.material.shadow.ShadowDrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced method 'void invalidateSelf()' in program class com.google.android.material.shadow.ShadowDrawableWrapper
Warning: com.google.android.material.shadow.ShadowDrawableWrapper: can't find referenced class androidx.appcompat.graphics.drawable.DrawableWrapper

I believe the error is that material-components-android currently depends on DrawableWrapper from AppCompat:

public class ShadowDrawableWrapper extends DrawableWrapper {

However, in AppCompat 1.6.1, it seems like theDrawableWrapper class was removed and renamed to DrawableWrapperCompat: https://cs.android.com/androidx/platform/frameworks/support/+/de70044326e54d6a50f0745f481bd46927cb777a

Therefore I think the solution here would be to update material-components-android to depend on AppCompat 1.6.1 and DrawableWrapperCompat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants