Android中缺少启动器图标

时间:2011-11-15 09:16:25

标签: android android-manifest

我的清单启动器活动如下:

 <activity android:name=".CBMainMenu" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" 
                  >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" /> 

                <data android:scheme="linkedinapp" android:host="connect" />
            </intent-filter>

其他应用程序正确安装,但为什么这个应用程序没有? 我可以在Applications>Manage Applications中看到此应用,但它在快捷方式中缺失。

这是我的完整清单:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.check.careerbuilder"
      android:versionCode="1"
      android:versionName="1.0">

   <uses-permission android:name="android.permission.GET_ACCOUNTS"></uses-permission>
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"></uses-permission>
    <uses-permission android:name="android.permission.USE_CREDENTIALS"></uses-permission>


    <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH"/>
    <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.youtube"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
 <uses-permission android:name="android.permission.CAMERA" />
 <uses-feature android:name="android.hardware.camera" />
 <uses-feature android:name="android.hardware.camera.autofocus" />

 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
    <uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>

    <application android:label="@string/app_name" android:icon="@drawable/appicon" >
        <activity android:name=".CBMainMenu" android:label="CB Ambassador" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" 
                  >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" /> 

                <data android:scheme="linkedinapp" android:host="connect" />
            </intent-filter>

        </activity>

    <uses-library android:name="com.google.android.maps" android:required="true"></uses-library>
    <activity android:name=".GoogleMap"></activity>


     <activity android:name=".Verify"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
     <activity android:name=".VideoPush"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
      <activity android:name=".Videoclass"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>

      <activity android:name=".SocialMedia" android:windowSoftInputMode="adjustPan"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
      <activity
            android:name=".PreviewActivity"
            android:windowSoftInputMode="stateHidden" />


        <activity android:name=".SearxhJobs"  android:windowSoftInputMode="adjustPan"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
        <activity android:name=".AboutUs"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
        <activity android:name=".Benefits"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>

        <activity android:name=".EndJobList" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".FirstJobList" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".SecondJobList" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".Pleaseselect"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".ThirdJobList" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".FourthJobList" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".JobsCities" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".JobsTypes" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".JobDescription" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>

<activity android:name="ReferAFriend" android:windowSoftInputMode="adjustPan"  android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".Faq" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>

<activity android:name=".ThanksActivity1" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".ThanksActivity" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".EmailThisJob" android:screenOrientation="portrait" android:theme="@android:style/Theme.Dialog" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".MyDialog" android:screenOrientation="portrait" android:theme="@android:style/Theme.Dialog" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".FileManagerActivity" android:screenOrientation="portrait" android:finishOnTaskLaunch="true"></activity>
<activity android:name=".ReferPopup" android:screenOrientation="portrait" android:theme="@android:style/Theme.Dialog"></activity>
<activity android:name=".Jobs" android:screenOrientation="portrait"></activity>
<activity android:name=".Youtube" android:screenOrientation="portrait"></activity>
<activity android:name=".Profile" android:screenOrientation="portrait"></activity>
<activity android:name=".Colleagues" android:screenOrientation="portrait"></activity>
<activity android:name=".ColleagueProfile" android:screenOrientation="portrait"></activity>
<activity android:name=".Takephoto" ></activity>
<activity android:name=".TwitterFollowers" android:screenOrientation="portrait"></activity>
<activity android:name=".FacebookFriends" android:screenOrientation="portrait"></activity>
<activity android:name=".LinkedinFriends" android:screenOrientation="portrait"></activity>
<activity android:name=".Moreoptions" android:screenOrientation="portrait"></activity>
<activity android:name=".Reader" android:screenOrientation="portrait"></activity>
<activity android:name=".Shareweb" android:screenOrientation="portrait"></activity>
<activity android:name=".Groupon" android:screenOrientation="portrait"></activity>
<activity android:name=".DealsShow" android:screenOrientation="portrait"></activity>
<activity android:name=".LocalWeather" android:screenOrientation="portrait"></activity>

 <activity android:name="com.brightcove.android.oneplanet.Playlists"
                  android:label="@string/app_name"
                  android:screenOrientation="portrait">

        </activity>
        <activity android:name="com.brightcove.android.oneplanet.Videos"
                android:label="@string/videos_activity" 
                android:screenOrientation="portrait"/>
        <activity android:name="com.brightcove.android.oneplanet.Player"
                android:label="@string/player_activity"
                android:configChanges="orientation"
                android:screenOrientation="landscape" />

        <activity android:theme="@style/YtdTheme" android:name="com.google.ytd.SubmitActivity"
                  android:configChanges="orientation|keyboardHidden"/>

        <activity android:theme="@style/YtdTheme" android:name="com.google.ytd.DetailsActivity"/>
        <activity android:theme="@style/YtdTheme" android:name="com.google.ytd.SubmitActivity"
                  android:configChanges="orientation|keyboardHidden"/>      

<activity android:name="com.check.careerbuilder.SmsTo" android:screenOrientation="portrait" android:theme="@android:style/Theme.Dialog"></activity>
 <activity android:name="com.ecs.android.sample.twitter.PrepareRequestTokenActivity" android:launchMode="singleTask">>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="x-oauthflow-twitter" android:host="callback" />
            </intent-filter>
        </activity>   

    <activity android:name=".CustomDataActivity" android:label="Custom Data" android:screenOrientation="portrait">

            <intent-filter>

                <action android:name="com.check.careerbuilder.DISPLAY_CUSTOM_DATA" />


                        <data android:scheme="notif" />

            </intent-filter>

</activity>




    </application>
    <uses-sdk android:minSdkVersion="3"  />


   <uses-feature
        android:name="android.hardware.telephony.gsm" />
</manifest>

如何解决这个问题?问题是什么?

5 个答案:

答案 0 :(得分:21)

问题是&lt; data android:scheme="linkedinapp" android:host="connect" />,您无法在启动器活动中逻辑地使用此标记,请参阅下面一行,我是从http://blog.marcingil.com/2011/03/starting-android-application-from-browser-uri/

获取的

设置活动是否应该是默认操作(中心按)对一段数据执行的选项。设置此项将在用户对某些数据执行操作时未设置任何活动时向用户隐藏。请注意,在启动操作时,这在Intent中是正常设置的 - 它用于在包中指定的intent过滤器。

答案 1 :(得分:3)

我知道这有点老了。但是,为了一个面临同样问题的人的利益来回答它。 启动器活动应具有如下特定过滤器,以便它显示在应用列表中。

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

答案 2 :(得分:3)

本主题未给出解决方案。真正的解决方案是使用多个意图过滤器,这里给出了https://stackoverflow.com/a/34611591/1828637

答案 3 :(得分:-1)

尝试添加

android:label="My App"
像这样:

<activity android:name=".CBMainMenu" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" android:label="My App" >

答案 4 :(得分:-1)

有些日子我一直面临同样的问题,无法找到我的发射器图标。所以这就是我的所作所为。 启动器活动应具有此(MAIN)<action android:name="android.intent.action.MAIN"

在你的`中删除<category android:name="android.intent.category.DEFAULT"之后你也试过了                                                    

            <data android:scheme="linkedinapp" android:host="connect" />
        </intent-filter>`

希望它有所帮助。