简体   繁体   English

应用程序图标未显示在应用程序中(在主屏幕上)

[英]App icon does not display in applications (on home screen)

My app used to work just fine, its icon displayed when installed in applications and it was uploaded to the Play Store. 我的应用程序过去运行正常,安装在应用程序中时会显示其图标,并将其上载到Play商店。 Now when I install it, it is like invisible, and in the Play Store it just says Uninstall, not open. 现在,当我安装它时,它就像是不可见的,在Play商店中它只是说“卸载”而不是“打开”。 What would be the reason for this? 这是什么原因呢?

Thanks. 谢谢。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="redacted" >
<uses-permission android:name="android.permission.INTERNET"/>
<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_GPS" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
    android:screenOrientation="portrait"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:hardwareAccelerated="true"
    >
    <activity
        android:name=".aboutclass"
        android:configChanges="orientation|screenSize"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="redacted.aboutclass" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".MainActivity"
        android:configChanges="orientation|screenSize"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <action android:name="redacted.MainActivity" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http"/>
            <data android:scheme="https"/>
            <action android:name="android.intent.action.VIEW" />
        </intent-filter>
    </activity>
    </application>
</manifest>

This problem occurs when you include the <data> element in the same intent-filter as your action.MAIN, which does not expect any data. 当您将<data>元素包含在与action.MAIN相同的intent过滤器中时,会出现此问题,它不希望任何数据。 You could try splitting the intent-filter like this: 您可以尝试像这样拆分intent-filter:

<activity
    android:name=".MainActivity"
    android:configChanges="orientation|screenSize"
    android:label="@string/app_name" >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter>
        <action android:name="redacted.MainActivity" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="http"/>
        <data android:scheme="https"/>
        <action android:name="android.intent.action.VIEW" />
    </intent-filter>
</activity>

See this previous answer. 请参阅此先前的答案。

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

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