1.导入最新的Aliyun.OSS.dll
2.将Unity-Player-Other Settings设置
Api Compatibillity Level* = .NET 4.X
编辑器下运行正常
3.导出android包以后,运行报错
2023-10-23 18:57:24.372 29533-29619/? D/xiaoyuan: getUpdateCycle start
2023-10-23 18:57:24.378 29426-29730/? I/Unity: —————–下载文件出错:System.NullReferenceException: Object reference not set to an instance of an object.
at Aliyun.OSS.Common.Communication.HttpExtensions.AddInternal (System.Net.WebHeaderCollection headers, System.String key, System.String value) [0x00000] in :0
at Aliyun.OSS.Common.Communication.HttpFactory.SetRequestHeaders (System.Net.HttpWebRequest webRequest, Aliyun.OSS.Common.Communication.ServiceRequest serviceRequest, Aliyun.OSS.Common.ClientConfiguration configuration) [0x00000] in :0
at Aliyun.OSS.Common.Communication.HttpFactory.CreateWebRequest (Aliyun.OSS.Common.Communication.ServiceRequest serviceRequest, Aliyun.OSS.Common.ClientConfiguration configuration) [0x00000] in :0
at Aliyun.OSS.Common.Communication.ServiceClientImpl.SendCore (Aliyun.OSS.Common.Communication.ServiceRequest serviceRequest, Aliyun.OSS.Common.Communication.ExecutionContext context) [0x00000] i
2023-10-23 18:57:24.392 1553-2442/? D/GameManagerService: respondWithJson. command: get_sysfs_data