Android APK 和 Debug 安装多个版本的应用程序
问题描述:
当我调试或什至在 APK 最终版本中时,应用会安装 5 个不同版本的应用.它们在应用程序抽屉中显示为同一应用程序的 5 个副本,但是当我打开其中一个时,它是旧版本.已安装的应用程序之一是最新的.当我卸载这些副本之一时,它们都会立即卸载.
When I'm debugging or even in a final APK release, app installs 5 different versions of the app. They appear in the app drawer as 5 copies of the the same app but when I open one of them, it a old version. One of the installed apps are current. When I uninstall one of these copies all of them uninstall at once.
答
您需要处理 Android Manifest 文件.您需要将以下代码仅用于启动 Activity,而不是每个 Activity.
You need to take care of Android Manifest file. You need to put following code to only startup activity not on every activity.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>