我有一个Unity3D游戏(2021.2.7f1.4128个人),我把Facebook导入到这个游戏中。我没有做任何其他的代码更改或更新。现在,当团结开始时(在我运行应用程序之前),我会得到一个重复的错误,上面写着:
AmbiguousMatchException: Ambiguous match found.
System.RuntimeType.GetMethodImplCommon (System.String name, System.Int32 genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
System.Type.GetMethod (System.String name) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
GooglePlayServices.UnityCompat.GetUnity56AndAboveApplicationIdentifier (UnityEditor.BuildTarget buildTarget) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:357)
GooglePlayServices.UnityCompat.GetApplicationId (UnityEditor.BuildTarget buildTarget) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:411)
GooglePlayServices.PlayServicesResolver.GetAndroidApplicationId () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:955)
GooglePlayServices.PlayServicesResolver.OnSettingsChanged () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2181)
GooglePlayServices.PlayServicesResolver..cctor () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:897)
Rethrow as TypeInitializationException: The type initializer for 'GooglePlayServices.PlayServicesResolver' threw an exception.
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)"
有人知道如何解决这个问题吗?
发布于 2022-01-09 10:01:18
这也发生在我这一边的一个新项目中,所以我所做的就是删除play服务解析器(由facebook添加的一个),而是导入外部依赖解决程序--来自google ( https://github.com/googlesamples/unity-jar-resolver )的一个。
https://stackoverflow.com/questions/70500836
复制相似问题