Cannot click next in Asset Studio when creating an icon

主宰稳场 提交于 2020-12-08 05:38:29

问题


Not sure where to post this issue I have with Android Studio IDE, I hope it can be answered here.

When I open the Asset Studio in Android Studio by right clicking on my Android Module and selecting new -> Image Asset I cannot get past the first screen. Even when I leave this default, when I try and press next the Asset Window start shaking shortly after a second or two.

  • I encountered this problem with a prior version of Android Stuido but an update to the latest version did not help.
  • I tried updating the android SDK and build tools since they are obviously related but without success.
  • I tried restarting Android Studio but the "bug" still remains.

Perhaps I am doing something wrong, I created a video of my workflow and the issue I am encountering.


回答1:


I had the same problem.

In the Legacy tab, I set the Google Play Store Icon to No and I could pass the first screen.




回答2:


I had exactly the same problem while I was trying to create adaptive icon from vector graphics.

What helped me was that I need to set Size to 108 dp x 108 dp when I imported Vector Asset (res -> right click -> New -> Vector Asset).




回答3:


I have faced the same issue with vectors that had a dashed line. Android Studio doesn't support dashed-strokes by default. You can check what is not supported in this link Dashes stroke-dasharray in Android Vector. So in such cases Android Studio just doesn't show any error upfront.

In your case I see its happening even for normal vectors.

To check why its failing notice every time it fails the exclamation mark at the extreme bottom right of Android Studio turns red and flashes. Just close pop up window of Android Studio and click on the red exclamation mark. It will give you the reason why its failing. Although there was nothing much I could do about it maybe you can figure out whats wrong.




回答4:


Steps:

1) Have you tried setting it manually through file explorer/directories etc.?

2) Maybe try a drawable importer? Like this.

3) Have a look at this answer, it might help.

4) Try completely uninstalling Android Studio, re-download and install again, if all else fails.




回答5:


As per your project structure, I believe this is not a native application.

That's right, Flutter projects are not Android projects. Many Android tools are enabled only for projects that have an Android facet. Adding that to Flutter projects causes many problems, so we don't do that and this functionality available for only in native android application.

Furthermore,If you want to use may be it'll help you.

Open android studio File->Open folder->navigate to your flutter project and select the Android folder. Wait for it to sync, then navigate inside the Android studio folder and find the res folder right click on it and choose New you will see the Image asset studio.




回答6:


I know it's been answered but here's another thing that might fix someone else's problem when adding an asset and getting the weird shaky window error: check the asset dimensions you're importing.

I was trying to add a Vector Asset with dimensions about 23dp x 1077dp (really big height and small width), and for some reason Android Studio didn't accept it. After changing it to a dimension bigger than 170dp x 8137.3dp (it scales automatically) it worked. Then I went on the .xml file and changed it to a dimension I wanted, preserving the proportion of mostly 200dp in width or height as prompted by Lint in a warning.

I don't really know why it worked but I managed to add the asset. If anyone knows it, feel free to explain.



来源:https://stackoverflow.com/questions/51083538/cannot-click-next-in-asset-studio-when-creating-an-icon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!