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

时间:2013-09-30 08:40:21

标签: android apk

我用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>

3 个答案:

答案 0 :(得分:1)

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

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

当您打开通过电子邮件发送或传输到手机的apk时,您会看到安装选项,成功安装后会显示 OPEN 选项。

答案 1 :(得分:0)

确保过滤器为                 

应该是MAIN而不是activity_main等。

还删除min / max SDK设置行...

这对我有用

答案 2 :(得分:0)

将标签放在此处的两个意图过滤器中

     <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>