Description: When using version 1.1.0-alpha07 or more recent version of material design library release builds fail due to proguard warnings.
Warning: com.google.android.material.snackbar.BaseTransientBottomBar$6: can't find referenced method 'android.graphics.Insets getMandatorySystemGestureInsets()' in library class android.view.WindowInsets
Warning: com.google.android.material.snackbar.BaseTransientBottomBar$6: can't find referenced class android.graphics.Insets
Warning: com.google.android.material.snackbar.BaseTransientBottomBar$6: can't find referenced class android.graphics.Insets
Warning: com.google.android.material.snackbar.Snackbar: can't find referenced method 'int getRecommendedTimeoutMillis(int,int)' in library class android.view.accessibility.AccessibilityManager
Expected behavior: Builds should be able to pass fine without having to edit proguard rules
Material Library version: 1.1.0-alpha07 and above
Can you share what compileSdkVersion you are using in your app/build.gradle file?
Yes, I am using 28 @dsn5ft
same problem
compileSdkVersion 28
implementation 'com.google.android.material:material:1.1.0-alpha06'
->
implementation 'com.google.android.material:material:1.2.0-alpha02'
Warning: com.google.android.material.snackbar.BaseTransientBottomBar$6: can't find referenced method 'android.graphics.Insets getMandatorySystemGestureInsets()' in library class android.view.WindowInsets
Warning: com.google.android.material.snackbar.BaseTransientBottomBar$6: can't find referenced class android.graphics.Insets
Warning: com.google.android.material.snackbar.BaseTransientBottomBar$6: can't find referenced class android.graphics.Insets
Warning: com.google.android.material.snackbar.Snackbar: can't find referenced method 'int getRecommendedTimeoutMillis(int,int)' in library class android.view.accessibility.AccessibilityManager
Thanks for the responses. I'm not sure if this will help, but can you try using compileSdkVersion 29?
I had a similar issue and compiling with sdk version 29 worked! Thanks!
Bumping up compileSDKVersion does allow you to build successfully, thanks for the suggestion @dsn5ft. Although I'll leave the issue open since technically speaking you shouldn't have to bump up the compileSDK (although it's recommended to always use latest) in order to fix this proguard issue.
The Material Android and AndroidX libraries do require compiling with the latest stable Android SDK version. So each year when the next version of Android becomes released as stable, we update our library's compileSdkVersion, which means client apps should update theirs as well, in order to use the latest version of the Material Android and AndroidX libraries.
The Material Android and AndroidX libraries do require compiling with the latest stable Android SDK version. So each year when the next version of Android becomes released as stable, we update our library's
compileSdkVersion, which means client apps should update theirs as well, in order to use the latest version of the Material Android and AndroidX libraries.
Makes sense, thanks!
Most helpful comment
Thanks for the responses. I'm not sure if this will help, but can you try using compileSdkVersion 29?