記錄不明坑
根據(jù)大佬們寫的文章Unity接入Google登錄超詳細流程接入Google,但是在導(dǎo)入安卓依賴管理插件EDM4U后,卻瘋狂報錯。
剛開始是:
Assembly 'Assets/ExternalDependencyManager/Editor/Google.VersionHandlerImpl_v1.2.157.dll' will not be loaded due to errors: Assembly name 'Google.VersionHandlerImpl' does not match file name 'Google.VersionHandlerImpl_v1.2.157'
原因是程序集跟文件名不匹配,把Google.VersionHandlerImpl_v1.2.157的版本后綴刪掉就好啦
后面又有一個報錯:
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 <88e4733ac7bc4ae1b496735e6b83bbd3>:0) System.RuntimeType.GetMethodImpl...
這個似乎是?由于反射(Reflection)庫在查找方法時出現(xiàn)了歧義(AmbiguousMatch)而導(dǎo)致的,例如在查找方法時,發(fā)現(xiàn)有多個方法名稱相同且參數(shù)類型也相同的方法。這種情況下,反射庫無法確定要調(diào)用哪個方法,因此會拋出 AmbiguousMatchException 異常。文章來源:http://www.zghlxwxcb.cn/news/detail-752023.html
找了很久,沒找到解決的方法,最終的解決方法是刪掉了安卓依賴管理里面的Google.IOSResolver跟Google.JarResolver,手動注冊安卓依賴,最終解決了...文章來源地址http://www.zghlxwxcb.cn/news/detail-752023.html
到了這里,關(guān)于Unity接入Google登錄,踩坑的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!