Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How I fix NOTHING TO SHOW in my vector asset in android studio

enter image description here

I want to add a new vector asset. I am trying to add a clipArt but it only shows in the dialog box "Nothing to show". No icon is showing and I want to add an icon. I don't know to fix this. Please help. I am still trying to learn android studio and I am practicing on how to use it.

like image 486
Cupcakewithchocolate Avatar asked Oct 16 '20 03:10

Cupcakewithchocolate


People also ask

How do I open a vector file on Android?

To start Vector Asset Studio: In Android Studio, open an Android app project. In the Project window, select the Android view. Right-click the res folder and select New > Vector Asset.


Video Answer


2 Answers

This a new problem introduced in the latest version of Android Studio 4.1. This happens when your windows user name folder contains a space. Rename your user name’s folder removing the space and it will work again.

For some reason the space make the folder where the icons are located not visible to Android Studio.

like image 189
Omar Navarro Avatar answered Oct 19 '22 08:10

Omar Navarro


For myself, my asset dialog only shows some of these icons. And here is my solution.

Go to

[SdkPath]/icons/material

There should be a file called icons_metadata.txt, and folders

  • materialicons
  • materialiconsoutlined
  • materialiconsround
  • materialiconssharp
  • materialiconstwotone

For each icon, there will be one folder in the folders above. For example, we have materialicons/share, materialiconsoutlined/share and so on.

These icon folders are not complete, only icons starting with digits exist. Since the folder only updated when "Select Icon" dialog is opening, I opened "Select Icon" dialog again, waiting for all icons are downloaded, and then reopen the dialog.

Then my problem is solved.

like image 7
xa0082249956 Avatar answered Oct 19 '22 09:10

xa0082249956