我有一个奇怪的问题。
我的mac机器中有我的.apk文件,我通过蓝牙将该文件发送到我的Galaxy Tab。当我安装该文件时,该应用程序已安装,但我获得了同一个应用程序的许多实例...
此外,当我取消整个应用程序时,所有应用程序实例都会被删除
由于我是Android开发的新手,请帮助我解决这个问题。
感谢您的帮助
这是我的清单文件
<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>
答案 0 :(得分:1)
这些行
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
应仅存在于主活动代码中。从所有其他活动标签中删除。
添加此意图过滤器表示此活动是应用程序的主要活动,应在启动器(应用程序抽屉)中列出
答案 1 :(得分:0)
我想补充一点,android:标签应该只出现在应用程序标签上,而不是其他地方。