Unity打包无法用Newtnsoft.Json
qtazszs1987 发布于2021-07 浏览:4105 回复:2
0
收藏

Unity 使用IL2CPP打包android , 调用人脸识别失败,但是使用Mono打包的android可用,是Newtnsoft.Json.dll的问题


System.NotSupportedException: System.Reflection.Emit.DynamicMethod::.ctorat Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateDynamicMethod (System.String name, System.Type returnType, System.Type[] parameterTypes, System.Type owner) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateDefaultConstructor[T] (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract (Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateDictionaryContract (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00000] in <00000000000000000000000000000000>:0
at Baidu.Aip.AipHttpRequest.ProcessHttpRequest (System.Net.HttpWebRequest webRequest) [0x00000] in <00000000000000000000000000000000>:0
at Baidu.Aip.AipHttpRequest.GenerateDevWebRequest (System.String token, System.Int32 timeout) [0x00000] in <00000000000000000000000000000000>:0
at Baidu.Aip.AipServiceBase.SendRequetRaw (Baidu.Aip.AipHttpRequest aipRequest) [0x00000] in <00000000000000000000000000000000>:0
at Baidu.Aip.AipServiceBase.SendRequet (Baidu.Aip.AipHttpRequest aipRequest) [0x00000] in <00000000000000000000000000000000>:0
at Baidu.Aip.AipServiceBase.PostAction (Baidu.Aip.AipHttpRequest aipReq) [0x00000] in <00000000000000000000000000000000>:0
at Baidu.Aip.Face.Face.Detect (System.String image, System.String imageType, System.Collections.Generic.Dictionary`2[TKey,TValue] options) [0x00000] in <00000000000000000000000000000000>:0

收藏
点赞
0
个赞
共2条回复 最后由ghjgfghghg回复于2022-12
#3macaw910813回复于2021-09

但是ANroid用L2CPP可以

0
#2macaw910813回复于2021-09

我也是。而且PC上不管是mono还是2CPP都不

0
TOP
切换版块