I'm trying to load a vector but keep getting this error stack trace
java.lang.IllegalArgumentException: Unknown command for: R
at androidx.compose.ui.graphics.vector.PathNodeKt.toPathNodes(PathNode.kt:275)
at androidx.compose.ui.graphics.vector.PathParser.addNode(PathParser.kt:525)
at androidx.compose.ui.graphics.vector.PathParser.parsePathString(PathParser.kt:84)
at androidx.compose.ui.graphics.vector.VectorKt.addPathNodes(Vector.kt:72)
at androidx.compose.ui.graphics.vector.compat.XmlVectorParser_androidKt.parsePath(XmlVectorParser.android.kt:279)
at androidx.compose.ui.graphics.vector.compat.XmlVectorParser_androidKt.parseCurrentVectorNode(XmlVectorParser.android.kt:101)
at androidx.compose.ui.res.VectorResources_androidKt.loadVectorResourceInner(VectorResources.android.kt:81)
at androidx.compose.ui.res.VectorResources_androidKt.vectorResource(VectorResources.android.kt:62)
at androidx.compose.ui.res.VectorResources_androidKt.vectorResource(VectorResources.android.kt:52)
at com.tapmax.football.ui.screens.design.DesignScreenKt$KitPager$1.invoke(DesignScreen.kt:440)
at com.tapmax.football.ui.screens.design.DesignScreenKt$KitPager$1.invoke(DesignScreen.kt:439)
I couldnt copy in the full code of my vector so i've attached an image, its just a normal vector

Your compiler warnings might complain about a RESOURCE_TOO_LONG (some path value). It seems there's a maximum for those.
The parser opens the string value, finds the R and doesn't know what to do with it.
You can either:
Z IIRC at the end of the first path to close it, and a M<last_coordinate> to the second to start from where it left). But really it'd be better to have a compliant source to start with :)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With