question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AVD export is crashing the app on Android API Level <21

See original GitHub issue

loading_icon_animated.txt

Tell us about your environment

  • Phone Version: Android 19
  • After Effects Version: 14.2.1.34

What did you do? Please explain the steps you took before you encountered the problem. Just exporting a xml file with After Effects and trying to integrate it into an Android application.

What did you expect to happen? An animating vector drawable

What actually happened? Please include as much relevant detail as possible. Crash after the following line of code:

AnimatedVectorDrawableCompat animatedVectorDrawable = AnimatedVectorDrawableCompat.create(getContext(), R.drawable .loading_icon_animated);

Caused by: android.view.InflateException: pathInterpolator requires the controlX1 attribute at android.support.graphics.drawable.PathInterpolatorCompat.parseInterpolatorFromTypeArray(PathInterpolatorCompat.java:90) at android.support.graphics.drawable.PathInterpolatorCompat.<init>(PathInterpolatorCompat.java:72) at android.support.graphics.drawable.PathInterpolatorCompat.<init>(PathInterpolatorCompat.java:65) at android.support.graphics.drawable.AnimationUtilsCompat.createInterpolatorFromXml(AnimationUtilsCompat.java:140) at android.support.graphics.drawable.AnimationUtilsCompat.loadInterpolator(AnimationUtilsCompat.java:81) at android.support.graphics.drawable.AnimatorInflaterCompat.loadAnimator(AnimatorInflaterCompat.java:821) at android.support.graphics.drawable.AnimatorInflaterCompat.loadObjectAnimator(AnimatorInflaterCompat.java:790) at android.support.graphics.drawable.AnimatorInflaterCompat.createAnimatorFromXml(AnimatorInflaterCompat.java:443) at android.support.graphics.drawable.AnimatorInflaterCompat.createAnimatorFromXml(AnimatorInflaterCompat.java:454) at android.support.graphics.drawable.AnimatorInflaterCompat.createAnimatorFromXml(AnimatorInflaterCompat.java:417) at android.support.graphics.drawable.AnimatorInflaterCompat.loadAnimator(AnimatorInflaterCompat.java:126) at android.support.graphics.drawable.AnimatorInflaterCompat.loadAnimator(AnimatorInflaterCompat.java:113) at android.support.graphics.drawable.AnimatorInflaterCompat.loadAnimator(AnimatorInflaterCompat.java:96) at android.support.graphics.drawable.AnimatedVectorDrawableCompat.inflate(AnimatedVectorDrawableCompat.java:485) at android.support.graphics.drawable.AnimatedVectorDrawableCompat.createFromXmlInner(AnimatedVectorDrawableCompat.java:253) at android.support.graphics.drawable.AnimatedVectorDrawableCompat.create(AnimatedVectorDrawableCompat.java:233)

Please provide a download link to the After Effects file that demonstrates the problem. File attached

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18

github_iconTop GitHub Comments

8reactions
nickbutchercommented, Nov 14, 2017

This is fixed in buildToolsVersion 27.0.1 🙌

3reactions
petedoylecommented, Nov 13, 2017

@nickbutcher Narrowed this down a bit. Crash goes away (on my particular test file) if I remove:

                    <aapt:attr name="android:interpolator">
                        <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
                    </aapt:attr>

From:

                <objectAnimator
                    android:duration="667"
                    android:propertyName="trimPathStart"
                    android:startOffset="868"
                    android:valueFrom="0"
                    android:valueTo="1"
                    android:valueType="floatType">
                    <aapt:attr name="android:interpolator">
                        <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
                    </aapt:attr>
                </objectAnimator>

(Seems like AAPT2 doesn’t support <aapt:attr ...> inside <objectAnimator>...</objectAnimator>)

Sample files (one crashes, one doesn’t): https://gist.github.com/petedoyle/409998f898a277b83649d1293403ee77

Not sure if there are tags other than objectAnimator that might also be affected…

Edit: might be fixed in the next build tools? https://issuetracker.google.com/issues/67668749

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect and diagnose crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >
Android: the app crashes if I run it on a device with API 24 or ...
If you are getting FileUriExposedException , you are running Android 7.0+ and an app with a targetSdkVersion of 24 or higher, and the...
Read more >
Android 12 crash on startup - Unity Forum
Hello there! I am having trouble launching my app in android 12. Right after the initial logo appearance from Android 12, before Unity...
Read more >
How to fix Premiere Pro crash issues - Adobe Support
Learn how you can fix common Premiere Pro freezing or crashing issues using these six simple steps.
Read more >
App crashing when trying to export or offline a fi...
App version 220.2.4 Android: 11 I am not able to export a file nor make it available off line, app keeps crashing during...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found