[英]Duplicated apps installed by Android Studio
I have an app X
that has two activities X
and F
that appear in the drawer. 我有一个应用程序
X
,该应用程序X
中有两个活动X
和F
I also use X
as a library for another app A
, that also has two activities that appear in the drawer, A
and M
. 我还将
X
用作另一个应用程序A
的库,该应用程序在抽屉中也有两个活动A
和M
So, what I've always done in Eclipse to install them was: 因此,我在Eclipse中为安装它们所做的始终是:
A
. A
Project > Properties > Android
, disabling in Is Library
. Project > Properties > Android
,在“ Is Library
禁用。 X
X
Is Library
for X
. X
Is Library
。 With this procedure, I always ended up with the 4 activities in the drawer. 通过此过程,我总是在抽屉中完成了4个活动。
Now, I'm trying to migrate to Android Studio. 现在,我正在尝试迁移到Android Studio。 I created a project and imported both apps as modules.
我创建了一个项目,并将两个应用程序都导入为模块。 Now to install them:
现在安装它们:
I repeated the above procedure, but editing the first line of the build.gradle
file of X
instead of (3) and (5) above. 我重复了上述过程,但是编辑了
X
的build.gradle
文件的第一行,而不是上面的(3)和(5)。 Kind of a pain, but it works... except for a very strange problem: I end up with TWO A
activities and TWO F
activities in the drawer (yes, same names!), plus M
and X
, now I have 6 instead of 4. The two A
activities, the M
and one F
belong to A
, while X
and F
to X
(as it has always been). 有点痛苦,但是它起作用了…… 除了一个非常奇怪的问题:我最后在抽屉中进行了两个
A
活动和两个F
活动(是的,名字相同!),加上M
和X
,现在我有6个代替of 4.两个A
活动, M
和一个F
属于A
,而X
和F
属于X
(一直如此)。
Even more crazy stuff: one of the A
does not work properly, while the other does. 甚至更疯狂的东西:其中一个
A
不能正常工作,而另一个A
可以正常工作。 In the app manager there is only one copy of A
and another of X
, as it has always been. 与往常一样,在应用程序管理器中只有
A
一个副本和X
另一个副本。
Why is this?? 为什么是这样?? What I am doing wrong?
我做错了什么? How can
A
have installed two copies of itself??? A
如何安装自身的两个副本??? Or maybe this is a bug of Nova launcher? 也许这是Nova启动器的错误? (rooted stock Android 4.4 here).
(此处的根源为Android 4.4)。
Thanks! 谢谢!
L. L.
This can happen if you have multiple activities specified as launcher activities. 如果您将多个活动指定为启动器活动,则可能会发生这种情况。 Please run app after making sure that only one activity is specified as launcher in manifest.
确保清单中仅将一个活动指定为启动器后,请运行应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.