简体   繁体   English

再次安装后图标出现问题 Android Studio

[英]Problem with icon after install again Android Studio

Some days ago I change my hard disk, so I need to re-install Android Studio.前几天换了硬盘,需要重新安装Android Studio。 When I clone my project again some icons don't work (others are shown well).当我再次克隆我的项目时,一些图标不起作用(其他图标显示得很好)。 Icons are in right folder (when I have mouse hover the icon's name i can see them) and they are equal (64x64 PNG)图标位于右侧文件夹中(当我有鼠标 hover 时,我可以看到它们的图标名称)并且它们是相等的(64x64 PNG) 在此处输入图像描述 . .

Some previews of the icons appear, other not.会出现一些图标的预览,而其他的则不会。 So I can't start app because the icons that don't appear are null.所以我无法启动应用程序,因为没有出现的图标是 null。 I don't know what happened when I install again Android Studio, because app works fine before it.我不知道当我再次安装 Android Studio 时发生了什么,因为应用程序在它之前运行良好。 I tried to add another icon but it also doesn't appear, I tried to create another project and use the same icon but don't work and I tried to invalidate cache and nothing.我试图添加另一个图标,但它也没有出现,我试图创建另一个项目并使用相同的图标但不起作用,我试图使缓存无效,什么也没有。

You should check on an android phone if you can download and play the app.如果您可以下载和播放该应用程序,您应该检查 android 手机。 If the problem is only with the emulator - it does get buggy, so the regular reinstalling the emulator/android studios, restarting your computer, trying to install a different emulator might work.如果问题仅出在模拟器上 - 它确实有问题,因此定期重新安装模拟器/android 工作室、重新启动计算机、尝试安装不同的模拟器可能会起作用。

Otherwise:否则:

The relevant line to look at is:要查看的相关行是:

android:icon="@mipmap/ic_launcher" This means that the app is going to the 'mipmap' folder inside your directory, and looking for a file named 'ic_launcher' - to display it as the App icon. android:icon="@mipmap/ic_launcher" 这意味着应用程序将进入您目录中的“mipmap”文件夹,并查找名为“ic_launcher”的文件 - 将其显示为应用程序图标。

You need to make sure this file name exists in the proper folder, and is in the correct format(this guide might help )您需要确保此文件名存在于正确的文件夹中,并且格式正确(本指南可能会有所帮助)

How to find the image location folder如何找到图像位置文件夹

If this doesn't help: remember that icons can be displayed at different qualities for different devices (hdpi, mdpi, xhdpi....) so sometimes if you want to make your own icon you need to make sure it fits the requirements (in the above guide)如果这没有帮助:请记住,对于不同的设备(hdpi、mdpi、xhdpi ......),图标可以以不同的质量显示,所以有时如果你想制作自己的图标,你需要确保它符合要求(在上述指南中)

Have you tried to check if all icons are in the project folder?您是否尝试检查所有图标是否都在项目文件夹中?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM