14

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.

Taslim Oseni
  • 6,086
  • 10
  • 44
  • 69
  • This is one of those things that usually "just works." Did you have any trouble installing Android Studio? You can try reinstalling it to see if the problem clears up making sure to pay attention to any errors that may occur. – Cheticamp Oct 21 '20 at 12:55

7 Answers7

11

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.

xa0082249956
  • 315
  • 5
  • 6
5

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.

Omar Navarro
  • 181
  • 4
3

If there are already this folders and still nothing in dialog try deleting <sdk>/icons/material/icons_metadata.txt

Credit to @MainActivity

Trancol
  • 227
  • 1
  • 4
  • 15
2

Those clip arts are located in "icons" folder inside your sdk folder on your hard drive and the sdk folder is generally this:

C:\Users\ --username-- \AppData\Local\Android\Sdk

I guess android studio cannot access the right sdk location so make sure the sdk location in your "File/Project Structure/SDK Location" matches the actual sdk location on your hard drive.

Alternatively, you can download the clip art you need from this link: Android Material and import them by choosing Local file in your Asset Studio.

MehranB
  • 1,460
  • 2
  • 7
  • 17
  • Still nothing to show , Have you updated Android Studio , It seems that the problem is the updated version of Android Studio – Waqas Tahir Oct 21 '20 at 13:18
  • 1
    I updated to 4.1 manually by downloading Android Studio executable without uninstalling Android Studio 4.0 & this seems to appear , I am also not sure if everybody on 4.1 is getting this issue – Waqas Tahir Oct 21 '20 at 13:20
  • I guess after I updated to android studio 4.1 about a week ago, during the process it showed a prompt saying something like do you wanna move the sdk or gradle folder for consistency or whatever and I just said yes and everything worked. that's why I added this answer so you check and make sure the paths are all correct. so does the icons folder in your adk folder contain the Materials? and is the sdk path correct? – MehranB Oct 21 '20 at 13:24
  • SDK path is correct & there is a material folder with icons in it , I don't know why Android Studio is not indexing it – Waqas Tahir Oct 21 '20 at 13:26
2

In Android Studio 4.1.1 this issue is resolved. Update if possible.

NRrugby14
  • 21
  • 2
  • I can confirm this worked. I was on v4.1.0 and the icons were still missing. But when I updated to v4.1.1, the icons started showing agian. – poetryrocksalot Nov 12 '20 at 04:07
0

It's working Your SDK folder name must be spaced less, ex- (UTTAM, UttamSdk, Uttam_sdk)

HAPPY CODING :)

UTTAM
  • 319
  • 3
  • 4
0

Same thing happened with me, also i was not able to change my user name because of Win 10 Single Lang. so i just moved my SDK folder to another path but there was not space between the path like from >> C:\Users\User Name\AppData\Local\Android\Sdk to >> C:\Users\Sdk.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Avinash Jha
  • 255
  • 1
  • 4
  • 12