alexjlockwood / adp-delightful-details

This sample app accompanies a blog post I wrote on icon animations
https://www.androiddesignpatterns.com/2016/11/introduction-to-icon-animation-techniques.html
MIT License
1.07k stars 160 forks source link

avd_progress_indeterminate_circular : java.lang.RuntimeException: Unknown interpolator name: x #10

Open eboudrant opened 6 years ago

eboudrant commented 6 years ago

Hello,

When using the circular spinner in our app we get this exception on release builds only (minified) : It works fine in debug.

11-21 17:12:00.974 21480 21480 D AndroidRuntime: Shutting down VM
11-21 17:12:05.250 20401 20401 E AndroidRuntime: FATAL EXCEPTION: main
11-21 17:12:05.250 20401 20401 E AndroidRuntime: Process: package_id, PID: 20401
11-21 17:12:05.250 20401 20401 E AndroidRuntime: android.content.res.Resources$NotFoundException: Drawable package_id:drawable/avd_progress_indeterminate_circular with resource ID #0x7f020069
11-21 17:12:05.250 20401 20401 E AndroidRuntime: Caused by: java.lang.RuntimeException: Unknown interpolator name: x
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.view.animation.AnimationUtils.createInterpolatorFromXml(AnimationUtils.java:397)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.view.animation.AnimationUtils.loadInterpolator(AnimationUtils.java:338)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:1053)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.animation.AnimatorInflater.loadObjectAnimator(AnimatorInflater.java:1007)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:663)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:676)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:638)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:126)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:808)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:784)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:613)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:580)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.content.res.Resources.getDrawable(Resources.java:771)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.support.v4.content.res.ResourcesCompat.getDrawable(ResourcesCompat.java:76)
11-21 17:12:05.250 20401 20401 E AndroidRuntime:    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.create(AnimatedVectorDrawableCompat.java:210)

I am starting to loose faith in Android animated vector drawables ;)

Our build is using Gradle 3.0 but we deactivated aapt2.

alexjlockwood commented 6 years ago

Don't lose faith in AVDs! Lose faith in aapt2 instead. :P

To be clear, does this happen in this sample app? Or does it happen in some other repo you have?

alexjlockwood commented 6 years ago

Are you still seeing this issue?

eboudrant commented 6 years ago

@alexjlockwood thanks for the follow up. The crash happened in our app on release build (proguard/shrink). Since then we removed the avd_progress_indeterminate_circular and used a circular ProgressBar.