1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Reddit AMA with Adam Myhill on Cinemachine, Thurs July 27 - 10AM PT. More info.
    Dismiss Notice
  6. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  7. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Error building Player: ArgumentException: An element with the same key already exists

Discussion in 'Android' started by DreamEnder, Apr 3, 2012.

  1. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    156
    I'm trying to build and run the game on my android device but it fails every time.

    Error building Player: ArgumentException: An element with the same key already exists in the dictionary.

    (Filename: Line: -1)
     
  2. TeotiGraphix

    TeotiGraphix

    Joined:
    Jan 11, 2011
    Posts:
    128
    Hi,

    My advice is start with a new project and try testing your device. If it doesn't work there is some non-normal issue.

    Mike
     
  3. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    156
    I just tried with an empty scene and it builds fine, creating the apk. However when I say build and run it fails and gives me the same error.

    I've left all the Player Settings at default except for the Bundle Identifier.

    My Unity is updated and I'm using the standard license for Android. I'm also using a mac.

    I manually pushed the apk to the device and tried to run it but it says the application is corrupt.
     
    Last edited: Apr 3, 2012
  4. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    156
    I just found out that the android device (Ainol Novo 7 Paladin) I'm trying to deploy to uses MIPs instead of ARM. I think that could be the problem.
     
  5. Waz

    Waz

    Joined:
    May 1, 2010
    Posts:
    243
    I found the same error message when using HTC One V. It seems to be the result of bad error checking in Unity and basically means "something changed under the hood while I was trying to build and deploy the APK".

    The cause for me was that the HTC Sync Manager was getting in the way, taking the connection away from ADB. I needed to install the HTC Sync Manager to get the USB Driver, but then needed to uninstall the actual Sync manager.