简体   繁体   中英

Duplicated apps installed by Android Studio

I have an app X that has two activities X and F that appear in the drawer. I also use X as a library for another app A , that also has two activities that appear in the drawer, A and M .

So, what I've always done in Eclipse to install them was:

  1. Clean both packages
  2. Install A .
  3. Go to Project > Properties > Android , disabling in Is Library .
  4. Install X
  5. Enable again Is Library for X .

With this procedure, I always ended up with the 4 activities in the drawer.

Now, I'm trying to migrate to 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. 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).

Even more crazy stuff: one of the A does not work properly, while the other does. In the app manager there is only one copy of A and another of X , as it has always been.

Why is this?? What I am doing wrong? How can A have installed two copies of itself??? Or maybe this is a bug of Nova launcher? (rooted stock Android 4.4 here).

Thanks!

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.

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