简体   繁体   中英

Strange issue when installing .apk file in samsung galaxy tab

I have a strange issue.

I have my .apk file in my mac machine and i sent that file to my Galaxy Tab via bluetooth. when i installed that file, that app gets installed but i get many instance of the same app...

Also when i unintsall the app, all the app instances gets deleted

As i am a newb in android development, please help me out to solve this issue.

Thanks for any help

This is my manifest file

<application android:icon="@drawable/co_logo" android:label="@string/app_name">
    <activity android:name="com.co.sampling.Loading"
              android:theme="@android:style/Theme.NoTitleBar"
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   
              >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="com.co.sampling.CoDb"  
              android:theme="@android:style/Theme.NoTitleBar"                
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>            
    <activity android:name=".Login"
              android:theme="@android:style/Theme.NoTitleBar"
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="com.co.sampling.OrderPrompt"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>            
    <activity android:name="com.co.sampling.New_Order_Screen_1"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="com.co.sampling.New_Order_Screen_2"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>  
    <activity android:name="com.co.sampling.Enrich_Order"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity> 
    <activity android:name="com.co.sampling.Customer_Feedback"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>   
    <activity android:name="com.co.sampling.Prompt"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>   
    <activity android:name="com.co.sampling.Enrich_Order"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="com.co.sampling.Enrich_Order_List"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity> 
    <activity android:name="com.co.sampling.PopupMenu"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="com.co.sampling.Order_NewOrder_2"   
              android:theme="@android:style/Theme.NoTitleBar"               
              android:label="@string/app_name" 
              android:screenOrientation="landscape"
              android:configChanges="orientation|keyboardHidden"   >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>             
</application>

These lines

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

should be present only in the main activity tag. Remove from all other activity tags.

Adding this intent filter indicates that this activity is the main activity of the app and should be listed in the launcher(apps drawer)

而且我要补充一点,android:label应该只出现在应用程序标签上,而不能出现在其他任何地方。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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