[英]Application icon removed from home screen on upgrade
I have an app available on market. 我在市场上有一个应用程序。 Now I am about to launch an upgrade.
现在我即将启动升级。 Due to some weird reason if I have an icon of old app on "Home screen" and I do upgrade ie replece, it deletes the homescreen icon.
由于一些奇怪的原因,如果我在“主屏幕”上有一个旧应用程序的图标,我升级即补充,它会删除主屏幕图标。 Is that due to change in icon?
这是由于图标的变化吗?
OLD: <application android:name="FlirtoApp" android:theme="@style/FlirtoTheme" android:icon="@drawable/icon" android:label="@string/app_name">
OLD:
<application android:name="FlirtoApp" android:theme="@style/FlirtoTheme" android:icon="@drawable/icon" android:label="@string/app_name">
NEW: <application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".app.App" android:debuggable="true">
新:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".app.App" android:debuggable="true">
You can work around this by using an activity alias in your manifest. 您可以通过在清单中使用活动别名来解决此问题。
If you need to change the activity associated with the launcher, you can prevent the loss of the home screen icon during an upgrade by declaring the activity that used to hold the LAUNCHER category intent filter as an alias of the first. 如果您需要更改与启动器关联的活动,则可以通过将用于保存LAUNCHER类别intent过滤器的活动声明为第一个的别名来防止在升级过程中丢失主屏幕图标。 Like so:
像这样:
<activity android:name=".ui.NewLaunchActivity"
android:label="@string/app_name">
</activity>
<activity-alias android:name="com.domain.app.OldLaunchActivity"
android:targetActivity=".ui.NewLaunchActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
I ran into this issue as well as this did the trick very nicely and the only side effect I've noticed is that ADB no longer auto-launches the application when it does the install from Eclipse. 我遇到了这个问题以及这个问题非常好,而且我注意到的唯一副作用是ADB在从Eclipse安装时不再自动启动应用程序。
You can also take a look at the docs . 您还可以查看文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.