在android中设置应用程序名称有问题吗?

发布于 2024-09-28 02:03:47 字数 542 浏览 2 评论 0原文

我的应用程序的问题是我在显示图标下看不到我的应用程序名称。我在清单文件中使用以下代码来设置项目的应用程序名称和图标。

<application android:icon="@drawable/icon" 
             android:label="@string/app_name"> 

将这段代码放入我的应用程序后,我可以看到图标,但应用程序名称(应用程序名称)根本不出现。我什至检查了 string.xml 文件中的字符串 app_name,发现它也在那里。

我什至尝试像下面这样直接硬核应用程序名称,

<application android:icon="@drawable/icon" 
              android:label="app_name">

但没有用,我看不到我的应用程序名称。我正在把这个问题搞得一团糟。任何人都可以建议,这里发生了什么以及必须做什么才能显示应用程序名称,或者是否有其他方法来显示我的应用程序名称?对此的任何建议都是值得赞赏的。

The problem with my application is that i could'nt see my application name under display icon. I used the following code in my manifest file to set application name and the icon for my project.

<application android:icon="@drawable/icon" 
             android:label="@string/app_name"> 

After putting this piece of code in my application, i can see the icon but the application name(app name) does'nt appear at all. I even checked the string.xml file for the string app_name and i found it was also there.

I even tried to hard core the app name directly like the below,

<application android:icon="@drawable/icon" 
              android:label="app_name">

but of no use i cannot see my app name. I was making a mess with this problem. can anyone suggest, what is happening here and what has to be done to display app name or is there anyother way to display my app name? Any suggestion on this is appreciable.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぽ尐不点ル 2024-10-05 02:03:47

您看到的名称必须是主 Activity 的名称,该 Activity 具有以下意图过滤器:

<intent-filter . . . >
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

Android 应用程序可以包含多个启动器 Activity,每个 Activity 都有不同的名称和图标。您为应用程序定义的名称和图标将显示在手机首选项的应用程序管理器中。

The name you see must be the name of your main Activity, the one which has the following intent-filter:

<intent-filter . . . >
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

An Android application can contain several Launcher Activities, each one with a different name and icon. The name and icon you define for the application are displayed in the applications manager in the phone preferences.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文