Search Unity

UnityPlayerActivity Merge Problem After Upgrading to Unity 5.2

Discussion in 'Android' started by ironfiftynine, Oct 6, 2015.

  1. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    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.
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Do you have only one manifest file in your project? What does it look like ? can you post it ?
     
  3. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    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.
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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 :)
     
  5. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    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. :)
     
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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.
     
  7. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    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?
     
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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.
     
    Yury-Habets likes this.
  9. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    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.
     
    Last edited: Oct 6, 2015
  10. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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 :)

    Let me know if you'd like me to help out
     
    ironfiftynine likes this.
  11. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    Ok. Will let you know. Thank you very much. :)