Android安装后无法看到应用程序图标

问题描述 投票:1回答:3

我用Android studio开发了一个应用程序,有一个非常奇怪的行为: 安装后我无法在所有应用列表中看到应用程序(不是图标或名称),但我可以在最近的应用程序和管理应用程序中看到它。 我通过电子邮件将APK发送给自己,安装后禁用了打开选项。我检查了ic_launcher图标,他们没事。

是什么导致的?有任何想法吗?

编辑:

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

    <uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="18" />

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".SplashActivity"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="http" android:host="my.package.name.host" />
            </intent-filter>
        </activity>
        <activity android:name=".MainActivity"
                  android:configChanges="orientation"/>

        <activity android:name=".LoginActivity"
                  android:windowSoftInputMode="adjustPan"
                  android:configChanges="orientation"/>
    </application>

</manifest>
android apk
3个回答
1
投票

对于我来说,在intent-filter中有以下几行就足以使ICON与其他应用程序一起出现在启动器中

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

当您打开apk,通过电子邮件发送或传输到您的手机时,您将看到INSTALL选项,并在成功安装后,OPEN选项就在那里。


1
投票

将标签放在两个类似于此处的intent-filters上

     <activity android:name=".MainActivity"
              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="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:scheme="http" android:host="qr_3d.com"/>
            <data android:scheme="https" android:host="qr_3d.com"/>
            <data android:scheme="app" android:host="qr_3d.com"/>
        </intent-filter>
    </activity>

0
投票

确保过滤器为

应该是MAIN而不是activity_main等。

还删除最小/最大SDK设置行...

这对我有用

© www.soinside.com 2019 - 2024. All rights reserved.