2
With Inkscape app, I’m trying to create my own custom SVG icons and then import them to Android Studio. On import to Android Studio I get the following error message ERROR@ line 29 <defs> is not supported
WARNING@ line 51 We don't scale the stroke width!
Can you help me with this error or do you know about some tutorial where you teach how to create SVG icons to import to Android Studio?
Code generated by Android Studio after importing a test SVG icon:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M12,12m-11.016,0a11.016,11.016 0,1 1,22.032 0a11.016,11.016 0,1 1,-22.032 0"
android:strokeLineCap="butt"
android:strokeColor="#00000000"
android:fillColor="#ff0000"
android:strokeWidth="1"
android:strokeLineJoin="miter"
android:strokeAlpha="1"/>
Have you ever tried to convert them to PNG?
– Leonardo Dias
I didn’t try, because I want Icon in SVG...
– Vitor Mendanha
Could show the code that is generated? so helps to identify the error! It seems that it is using something that Android Studio does not understand!
– Thiago Luiz Domacoski
@Thiago Luiz Domacoski, I edited my question and added the code generated by Android Studio after importing the SVG file.
– Vitor Mendanha
error while creating? or when Voce runs the application? Here no error occurred! Steps: 1. I created one. any xml in the drawable folder; 2. I pasted the contents above! Ran smoothly !
– Thiago Luiz Domacoski
The error occurs when creating. I edited my question and added a new code and print screen of the Android Studio error.
– Vitor Mendanha