应用程序图标不显示(Android Studio) [英] App icon doesn't show (Android Studio)

查看:1029
本文介绍了应用程序图标不显示(Android Studio)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次制作Android应用程序.我的第一个应用程序只进行了3种设计,但是每次我运行Android虚拟设备时,应用程序的图标都不会显示(应用程序本身:().有人可以帮我解决这个问题吗?

This is my very first time to make an android application. I've only made 3 designs for my very first app but every time I ran the Android Virtual Device, the icon of my app doesn't show up (the application itself :( ). Can someone help me about this? I am really new into this.

这是我的清单文件. 谢谢!

Here's my Manifest file. Thank you!

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.sti.myactivity">

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".Mylove">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".RegisterActivity" />
    <activity android:name=".UserAreaActivity"></activity>
</application>

</manifest>

推荐答案

我建议像这样将您的图标导入Android项目:

右键单击您的App文件夹,然后转到NEW-> Image Asset,然后将图标上传到该文件夹​​.然后它将显示出来.

Right click on your App folder and go to NEW -> Image Asset and upload the icon there. then it will show up.

将显示此屏幕,您可以在其中简单地选择icon.png

You will be presented with this screen where you can simply select your icon.png

此外,它会自动以所有不同的屏幕密度缩放图标!

Furthermore it automatically scales the Icon in all the different screen densities!

关于更新的问题:

执行以下操作:

  • 确保您的代码正确编译
  • 确保图像图标位于mipmap文件夹中,您应该查找名为AndroidStudioProjects的文件夹(默认情况下)-> yourProjectName-> App-> src-> main- > res-> mipmap.还请确保mipmap文件夹具有所需的屏幕密度(例如xhdpi)
  • 使用android studio顶部(在Mac上为Command-R)顶部的运行"按钮,并确保您选择了正确的模拟器
  • Make sure your code compiles correctly
  • Make sure the image icon is in mipmap folder, you should look for a folder named AndroidStudioProjects (by default) -> yourProjectName -> App -> src -> main -> res -> mipmap. also make sure that the mipmap folder has the screen density you need (e.g. xhdpi)
  • Use the Run Button on the top in android studio (Command-R on Mac) and make sure you select the right emulator

无论如何,如上所述导入图标都可以避免所有这些问题,因为它可以为您完成所有工作.

希望这会有所帮助!

这篇关于应用程序图标不显示(Android Studio)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆