启动图标不在模拟器或设备上显示

时间:2018-04-19 13:18:29

标签: android icons mipmaps

运行应用程序时,模拟器或设备上未显示启动图标。有一个类似的问题,但提供的答案并没有解决这个问题,所以我认为它可以再次提出这个问题。

我在清单文件中添加了必需的标签。 ic_launcher剪贴画图标是使用配置图像资产工具生成的,默认名称为ic_launcher,它们位于标题下的mipmaps文件夹中:

 ic_launcher(6)
 ic_launcher_foreground(5)
 ic_launcher_round(6)

Manifest文件如下:

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />

<application
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    android:fullBackupContent="@xml/backup_descriptor">
    <activity
        android:name=".HomeActivity"
        android:label="@string/app_name"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />

            <!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
            <data android:scheme="http"
                android:host="https://wwww.xxxxxxxxxxxxxx.com"
                android:pathPrefix="/kalkan"/>
            <!-- note that the leading "/" is required for pathPrefix-->
            <!-- Accepts URIs that begin with "example://gizmos” -->
            <data android:scheme="rental"
                android:host="kalkan" />
        </intent-filter>
    </activity>

    <activity
        android:name=".DetailActivity" />
    <activity android:name=".MapsActivity"/>
    <activity android:name=".ListActivity"/>
    <activity android:name=".AboutKalkanActivity" />
    <activity android:name=".WebActivity" />
    <activity android:name=".OwnerImageUploadActivity" />
    <activity android:name=".OwnerInputDataActivity" />
    <activity android:name=".OwnerLoginActivity" />
    <activity android:name=".OwnerMainActivity" />
    <activity android:name=".OwnerMapActivity" />
    <activity android:name=".OwnerResetPasswordActivity" />
    <activity android:name=".OwnerSignupActivity" />

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxx" />

</application>

0 个答案:

没有答案