Home > database >  Click on Clip Art icon on Vector asset import wizard doesn't working
Click on Clip Art icon on Vector asset import wizard doesn't working

Time:06-27

Clicking on Clip Art Button on Vector Asset Import Wizard causes an android studio JSON de-serializing exception of material icons metadata file and nothing happening

Exception

Error obtaining metadata file

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: "ٹل›ذ"
    at com.google.gson.Gson.fromJson(Gson.java:944)
    at com.google.gson.Gson.fromJson(Gson.java:870)
    at com.android.tools.idea.material.icons.metadata.MaterialIconsMetadata$Companion.parse(MaterialIconsMetadata.kt:47)
    at com.android.tools.idea.material.icons.utils.MaterialIconsUtils.getMetadata(MaterialIconsUtils.kt:92)
    at com.android.tools.idea.npw.assetstudio.MaterialVdIconsProvider$Companion.loadMaterialVdIcons(MaterialVdIconsProvider.kt:89)
    at com.android.tools.idea.npw.assetstudio.MaterialVdIconsProvider.loadMaterialVdIcons(MaterialVdIconsProvider.kt)
    at com.android.tools.idea.npw.assetstudio.ui.IconPickerDialog.<init>(IconPickerDialog.java:237)
    at com.android.tools.idea.npw.assetstudio.ui.IconPickerDialog.<init>(IconPickerDialog.java:155)
    at com.android.tools.idea.npw.assetstudio.ui.VectorIconButton.lambda$new$0(VectorIconButton.java:61)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)

/*other code*/

I can't import Vector Asset to my project what can I do to resolve this issue ?

CodePudding user response:

Vector Asset Import Wizard did not worked for me a few times after some upgrades or unknown reasons.

Clip Art was showing any icon, although sdk path had icons folder.

Please, try these steps below. Let me know, if it does not work for you. Hope it helps.

Steps to recreate vector icons folder

  • Go to your Android sdk directory
  • Remove or rename icons folder
  • Try to create a new Vector Asset.

Android Studio will create a new icons folder.

  • Related