UnityPlayerActivity Merge Problem After Upgrading to Unity 5.2

I upgraded to Unity 5.2 and I was experiencing a manifest merge problem.

I checked my Manifest files and I have only one entry of UnityPlayerActivity.

When I removed this line, everything seems to be working properly. I just want to ask, if there were changes on how the Manifest file is constructed in Unity 5.2? Is it automatically adding the UnityPlayerActivity upon build? Thank you very much.

Do you have only one manifest file in your project? What does it look like ? can you post it ?

Here are the manifest files that I found as far as I’ve searched.

The other has almost no content at all.

Hope this helps.

I think that Unity has its own Android project template (with its own manifest). When you add your own manifest, it gets merged with the default one.

According to the error message, it’s having trouble merging the activity element with name = “UnityPlayerActivity”. If you are providing your own custom activity (derived from UnityPlayerActivity) i don’t think you should declare this again in the manifest.

Not 100% sure on this one, but @bitter or @Yury-Habets may be able to confirm that :slight_smile:

I see. I think one or more of my imported unity packages have custom activity as you described. I’m just surprised since I don’t get these errors back in the previous versions of Unity. Thank you for your response. :slight_smile:

Having an activity is not an issue, the problem is that merging these activities together fails… I guess the same activity is defined more than once.

Can I clarify that? Do you mean that the activity is added to the manifest file just by having it extended in the java classes used by the project?

I meant: you should declare all activities in your AndroidManifest.xml so you could launch them and show them (Android requires that).

There is no problem with declaring new activities in the manifest - every plugin can define its own set of activities to display to the user.

The issue here, is that the manifest merging fails, since there seems to be 2 of the same activities defined somewhere.

1 Like

Ok thanks for the clarification My apologies I’m not much acquainted with the Manifest functionality. I wonder if I missed a manifest file where the duplicate activities were defined since I seem to find all the manifest files present in the project. I just searched for AndroidManifest.xml.

If it is possible, you could share the project (in private) with me and i can spend a few minutes looking at it. I just did that with another forum member :slight_smile:

Let me know if you’d like me to help out

1 Like

Ok. Will let you know. Thank you very much. :slight_smile: