开发者

Android app icon shows on device to allow uninstall but does not allow to execute

I am able to run an android app in two virtual devices when degugging.(Galaxy tab and phone). When I close the app in debug mode the icon is not showing in the virtual device.

The same thing occurs when I load a signed .apk file to the actual devices.

The app icon shows when I go into manage applications. I can uninstall the app. Thats all I can do. I cannot launch the app since the icon is not visible with the other app icons.

I am using platform 2.2 with google api's 8.

What am I doing wrong? How can I get the app icon to show with other apps and be able to launch?

Here is my manifest file. Any help is appreciated.

<uses-permission 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:name="android.permission.INTERNET">
</uses-permission>
<uses-permission 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:name="android.permission.ACCESS_FINE_LOCATION">
</uses-permission>

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

<application 
    android:label="@string/app_name"
    android:icon="@drawable/appicon"
    android:name=".ApplicationController"
    android:debuggable="true" >

    <uses-library android:name="com.google.android.maps" />

    <activity android:name=".MainActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.Main" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".MainFlippingActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MainFlipping" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".PrefsTabWidget"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.PrefsTabWidget" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".PrefsTaskingActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.PrefsTasking" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".SatelliteSelectionActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.SatelliteSelection" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="MainSettingsActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MainSettings" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="ClassificationActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.Classification" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="ListItemPrefActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.ListItemPref" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="TimeOnTargetActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.TimeOnTarget" />
            <category android:name="android.intent.category.L开发者_开发百科AUNCHER" />
        </intent-filter>
    </activity>


    <activity android:name="LatLonActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.LatLon" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="QuantityActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.Quantity" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="IncidenceAngleActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.IncidenceAngle" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>


    <activity android:name="SendUrlActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.SendUrl" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="TestActivity"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.Test" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="Slide"
            android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.Slide" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>


</application>


<uses-sdk android:minSdkVersion="8"/>


You should only be using <category android:name="android.intent.category.LAUNCHER" /> for one of your activities, not all of them. Try removing all others except the one that goes with <action android:name="android.intent.action.Main" />

EDIT: I may be wrong but I think you'll also need to capitalize MAIN as in <action android:name="android.intent.action.MAIN" /> for it to be recognised as the 'main' entry point (main activity).


Try to remove "android.intent.category.LAUNCHER" for each activity because android project must have only one LAUNCHER activity.


try to this if your main activity use this

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

Other activity you can use this

<intent-filter>
        <action android:name="android.intent.action.(your action )" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>

I think it can be helpful to you .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜