安装后Android应用程序图标不显示

时间:2017-06-30 05:51:15

标签: android android-studio

我安装了Android Studio,并制作了一个简单的应用程序。 当我在手机上安装APK文件时,它安装得很好,但我的主屏幕上没有任何应用程序图标。

之前已经问过这个问题,答案是我在AndroidManifest.xml中需要以下几行

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

他们已经在那里了。这是我的完整AndroidManifest代码:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pizza.learn.learnpizza">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".FullscreenActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/app_name"
        android:theme="@style/FullscreenTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
</manifest>

知道我做错了吗?

2 个答案:

答案 0 :(得分:1)

请更改清单文件....这里

 android:icon="@mipmap/ic_launcher"

替换ic_launcher
android:icon="@mipmap/ic_launcher_round"

并从Menifest文件中删除此行

 android:roundIcon="@mipmap/ic_launcher_round"

答案 1 :(得分:0)

希望它能为您提供帮助,只需复制并粘贴您的清单文件

即可

的AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pizza.learn.learnpizza">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>