Search code examples
androidandroid-vectordrawable

Android Vector Drawable crash


I use Vector Drawables. It works good on my several devices, but on my Sony with Android 5.0.2 I get at my application launch:

java.lang.ArrayIndexOutOfBoundsException: length=32; index=32
 at android.util.PathParser$PathDataNode.addCommand(PathParser.java:370)
 at android.util.PathParser$PathDataNode.nodesToPath(PathParser.java:260)
 at android.graphics.drawable.VectorDrawable$VPath.toPath(VectorDrawable.java:1265)
  at android.graphics.drawable.VectorDrawable$VPathRenderer.drawPath(VectorDrawable.java:950)

Looks like I have some svgs converted to xml with unsupported tags for this device. But how to understand which ones and how to be sure that it will work on all other supported devices.


Solution

  • The same problem http://code.google.com/p/android/issues/detail?id=78162 (Closed: Oct 2014) Problem was that one of my vector xml contained a scientific notation.

    So at this moment to be sure that you application will work on all devices, make sure that your xml vector drawables don't contain e-