简体   繁体   English

我的androidmanifest有什么问题? 启动器图标标签未出现

[英]What is wrong with my androidmanifest? launcher icon label does not appear

When I run my simple app the app label doesn't appear on my launcher. 当我运行我的简单应用程序时,应用程序标签不会显示在启动器上。 I tried to fix with all that I could, But nothing id different. 我尽力解决了所有问题,但是没有什么不同。 This is my manifest.xml 这是我的manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.marc.torch"
 android:versionCode="1"
 android:versionName="1.0">

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_torch"
    android:label="@string/app_name"
    android:theme="@style/FullscreenTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" 
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

This is my String file: 这是我的字符串文件:

<?xml version="1.0" encoding="utf-8"?>
  <resources>
    <string name="app_name">Torch</string>
  </resources>
</manifest>

Screenshot: 屏幕截图: 这是我的截图

You are using the "FullscreenTheme". 您正在使用“ FullscreenTheme”。 I am suggest you that if you want to display a label then change your theme go to the styles and change the theme. 建议您如果要显示标签,然后更改主题,请转到样式并更改主题。

Did you check your string.xml file ? 您是否检查过string.xml文件? app_name must be defined over there..... app_name必须在那定义。

1)you might have spelling or capital letter mistake with this FullscreenTheme 1)您可能在此FullscreenTheme上出现拼写错误或大写字母错误

2)check your FullscreenTheme (style) in res->values->strins.xml 2)在res-> values-> strins.xml中检查您的FullscreenTheme(样式)

3)you might find something similiar to this. 3)您可能会发现与此类似的东西。

<style name="AppFullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar">
     <item name="android:windowNoTitle">true</item>
     <item name="android:windowActionBar">true</item>
     <item name="android:windowFullscreen">true</item>
     <item name="android:windowContentOverlay">@null</item>
 </style>

4) Remove NoActionBar from the parent. 4)从父级删除NoActionBar。

5)change the values of the screen as required by simply changing there values. 5)只需更改那里的值即可根据需要更改屏幕的值。

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

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