ArgumentException: Requested value 'X86' was not found

Mathilorian picture Mathilorian · May 26, 2019 · Viewed 25.3k times · Source

i try to import GoogleMobileAds sdk to unity. when i import PlayServicesResolver package, i am getting error on console like this 'ArgumentException: Requested value 'X86' was not found.' I cant figure out why?

ArgumentException: Requested value 'X86' was not found. System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) (at <23c160f925be47d7a4fd083a3a62c920>:0) System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) (at <23c160f925be47d7a4fd083a3a62c920>:0) System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) (at <23c160f925be47d7a4fd083a3a62c920>:0) System.Enum.Parse (System.Type enumType, System.String value) (at <23c160f925be47d7a4fd083a3a62c920>:0) GooglePlayServices.AndroidAbis.EnumValueStringToULong (System.Type enumType, System.String enumValueString) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/AndroidAbis.cs:220) GooglePlayServices.AndroidAbis.get_Current () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/AndroidAbis.cs:278) GooglePlayServices.PlayServicesResolver.m__1B () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1201) GooglePlayServices.PlayServicesResolver+PropertyPoller1[T].Poll (System.Func1[TResult] getCurrentValue, GooglePlayServices.PlayServicesResolver+PropertyPoller`1+Changed[T] changed) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:278) GooglePlayServices.PlayServicesResolver.PollAndroidAbis () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1201) UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:303)

Answer

Yas Ikeda picture Yas Ikeda · Aug 23, 2019

You can solve this issue in Unity 2019.3 as mentioned in GitHub googlesamples/unity-jar-resolver. You just need newer version of Play Services Resolver than v1.2.115.

  1. download a release archive from GitHub googlesamples/unity-jar-resolver. be aware the note below.
  2. extract files from the archive, and go to its root directory
  3. run build as described in Building from Source in README.md, and you will get a unity package file at ./build/plugin.unitypackage. You may need to install modules in Unity if you lack something in Unity. (e.g. iOS Build Support)
  4. in the project window on Unity, delete /Assets/PlayServicesResolver folder
  5. on Unity, import all files from the package file that you built at step 3 above

NOTE: In my environment, v1.2.115 failed at its build because of error CS0619, so I chose v1.2.124 instead. With this version, build succeeded and is working good with Unity 2019.3.0a12 for me so far.