When using a xml file to define a vector with comp...
# compose
j
When using a xml file to define a vector with compose-resources, I get the following error from android studio “URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)”
Copy code
<vector xmlns:android="<http://schemas.android.com/apk/res/android>" // <- the url is red and the error comes when hovering it.
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="###"
        android:pathData="M160,840L160,360L480,120L800,360L800,840L560,840L560,560L400,560L400,840L160,840Z"/>
</vector>
The app works just fine, I can display the icon, but the code analysis from Android Studio complains about it. Any workaround?
j
I think this is an Android Studio/Kotlin Multiplatform plugin limitation. If you copy that same file into the Android resources folder it goes away. Maybe it’s related to the AGP knowing how to natively parse that xml namespace.
j
Yes I think so too, it’s probably something Jetbrains can fix on their side, the question is how prioritised is it