Search Unity

`MiniJSON' already contains a definition for `Json' Error When Inport.

Discussion in 'Unity Ads & User Acquisition' started by FlipZOG, Oct 14, 2014.

  1. FlipZOG

    FlipZOG

    Joined:
    Oct 14, 2014
    Posts:
    7
    When I Inport The Unity3d Ads Package It Gives Me This Error: `MiniJSON' already contains a definition for `Json'
     
  2. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Unity Ads includes a version of MiniJSON. If you have another package in your project with a Json library, this would be why you're seeing this error. To resolve this issue, we will be adding the version of MiniJSON included with Unity Ads to the UnityEngine.Advertisements namespace. For the time being, you can either add in the namespace declaration yourself, or remove the duplicate version of Json.
     
  3. FlipZOG

    FlipZOG

    Joined:
    Oct 14, 2014
    Posts:
    7
    Is There Any Tutorials That Can Show Me How To Set The Whole Thing Up?
     
  4. The_BenEvans

    The_BenEvans

    Joined:
    Jul 31, 2012
    Posts:
    139
    I've been having this issue when I've imported Google Play Services. My current workaround is search for MiniJson in the project search field, click on each one and check which one is longer (shorter scrollbar on the preview window)(assuming that the bigger the script = better, might be a bad assumption), and then delete the shorter script.

    Seems to be working without issue...
     
  5. FlipZOG

    FlipZOG

    Joined:
    Oct 14, 2014
    Posts:
    7
    How Do You Set The Script Up To Show Ads?
     
  6. The_BenEvans

    The_BenEvans

    Joined:
    Jul 31, 2012
    Posts:
    139
    Follow the instructions from here, if you got the package from the Asset Store you'll want the 2nd link
     
  7. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
  8. FlipZOG

    FlipZOG

    Joined:
    Oct 14, 2014
    Posts:
    7