更新最新版的sdk
没有足够的数据
(゚∀゚ )
暂时没有任何数据
幸运 提出了问题 · 2019-04-24
使用unity2017开发,接入目前最新的leanCloud Sdk ,在使用文档上的推荐方法创建聊天室时失败 m_client.CreateChatRoomAsync(“聊天室”),
错误提示
使用创建普通对话的方法,设置对话的属性,也就是文档上不推荐的方法。可以成功创建聊天室
// 请把代码文本粘贴到下方(请勿用图片代替代码)
AVRealtime avRealtime = new AVRealtime(m_appId, m_appKey);
AVIMClient client = await avRealtime.CreateClientAsync(m_clientId);
期待可以使用文档上的推荐方法,创建成功聊天室,但是有报错
报错log:
System.NullReferenceException: 当前对话没有关联有效的 AVIMClient。
at LeanCloud.Realtime.AVIMConversation.get_CurrentClient () [0x00008] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMConversation..ctor (LeanCloud.Realtime.AVIMClient client) [0x00023] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMConversation..ctor (LeanCloud.Realtime.AVIMConversation source, System.String name, System.String creator, System.Collections.Generic.IEnumerable1[T] members, System.Collections.Generic.IEnumerable
1[T] muteMembers, System.Boolean isTransient, System.Boolean isSystem, System.Collections.Generic.IEnumerable`1[T] attributes, LeanCloud.AVObject state, System.Boolean isUnique, System.Boolean isTemporary, System.Int32 ttl, LeanCloud.Realtime.AVIMClient client) [0x00000] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMClient.CreateChatRoomAsync (System.String chatroomName) [0x00000] in <d632fe62608d4878ab3ee2352431e2fe>:0
at GameLeanCloud.ChatClientManager+<SetClient>c__async0.MoveNext () [0x000b4] in /Users/sangshuai/HumanFallFlatSDK/Assets/Scripts/LeanCloud/ChatClientManager.cs:48
UnityEngine.Debug:Log(Object)
GameLeanCloud.<SetClient>c__async0:MoveNext() (at Assets/Scripts/LeanCloud/ChatClientManager.cs:52)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
使用unity2017开发,接入目前最新的leanCloud Sdk ,在使用文档上的推荐方法创建聊天室时失败 m_client.CreateChatRoomAsync(“聊天室”),错误提示
关注 2 回答 2
幸运 提出了问题 · 2019-04-24
使用unity2017开发,接入目前最新的leanCloud Sdk ,在使用文档上的推荐方法创建聊天室时失败 m_client.CreateChatRoomAsync(“聊天室”),
错误提示
使用创建普通对话的方法,设置对话的属性,也就是文档上不推荐的方法。可以成功创建聊天室
// 请把代码文本粘贴到下方(请勿用图片代替代码)
AVRealtime avRealtime = new AVRealtime(m_appId, m_appKey);
AVIMClient client = await avRealtime.CreateClientAsync(m_clientId);
期待可以使用文档上的推荐方法,创建成功聊天室,但是有报错
报错log:
System.NullReferenceException: 当前对话没有关联有效的 AVIMClient。
at LeanCloud.Realtime.AVIMConversation.get_CurrentClient () [0x00008] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMConversation..ctor (LeanCloud.Realtime.AVIMClient client) [0x00023] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMConversation..ctor (LeanCloud.Realtime.AVIMConversation source, System.String name, System.String creator, System.Collections.Generic.IEnumerable1[T] members, System.Collections.Generic.IEnumerable
1[T] muteMembers, System.Boolean isTransient, System.Boolean isSystem, System.Collections.Generic.IEnumerable`1[T] attributes, LeanCloud.AVObject state, System.Boolean isUnique, System.Boolean isTemporary, System.Int32 ttl, LeanCloud.Realtime.AVIMClient client) [0x00000] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMClient.CreateChatRoomAsync (System.String chatroomName) [0x00000] in <d632fe62608d4878ab3ee2352431e2fe>:0
at GameLeanCloud.ChatClientManager+<SetClient>c__async0.MoveNext () [0x000b4] in /Users/sangshuai/HumanFallFlatSDK/Assets/Scripts/LeanCloud/ChatClientManager.cs:48
UnityEngine.Debug:Log(Object)
GameLeanCloud.<SetClient>c__async0:MoveNext() (at Assets/Scripts/LeanCloud/ChatClientManager.cs:52)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
使用unity2017开发,接入目前最新的leanCloud Sdk ,在使用文档上的推荐方法创建聊天室时失败 m_client.CreateChatRoomAsync(“聊天室”),错误提示
关注 2 回答 2
幸运 关注了问题 · 2019-04-24
使用unity2017开发,接入目前最新的leanCloud Sdk ,在使用文档上的推荐方法创建聊天室时失败 m_client.CreateChatRoomAsync(“聊天室”),
错误提示
使用创建普通对话的方法,设置对话的属性,也就是文档上不推荐的方法。可以成功创建聊天室
// 请把代码文本粘贴到下方(请勿用图片代替代码)
AVRealtime avRealtime = new AVRealtime(m_appId, m_appKey);
AVIMClient client = await avRealtime.CreateClientAsync(m_clientId);
期待可以使用文档上的推荐方法,创建成功聊天室,但是有报错
报错log:
System.NullReferenceException: 当前对话没有关联有效的 AVIMClient。
at LeanCloud.Realtime.AVIMConversation.get_CurrentClient () [0x00008] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMConversation..ctor (LeanCloud.Realtime.AVIMClient client) [0x00023] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMConversation..ctor (LeanCloud.Realtime.AVIMConversation source, System.String name, System.String creator, System.Collections.Generic.IEnumerable1[T] members, System.Collections.Generic.IEnumerable
1[T] muteMembers, System.Boolean isTransient, System.Boolean isSystem, System.Collections.Generic.IEnumerable`1[T] attributes, LeanCloud.AVObject state, System.Boolean isUnique, System.Boolean isTemporary, System.Int32 ttl, LeanCloud.Realtime.AVIMClient client) [0x00000] in <d632fe62608d4878ab3ee2352431e2fe>:0
at LeanCloud.Realtime.AVIMClient.CreateChatRoomAsync (System.String chatroomName) [0x00000] in <d632fe62608d4878ab3ee2352431e2fe>:0
at GameLeanCloud.ChatClientManager+<SetClient>c__async0.MoveNext () [0x000b4] in /Users/sangshuai/HumanFallFlatSDK/Assets/Scripts/LeanCloud/ChatClientManager.cs:48
UnityEngine.Debug:Log(Object)
GameLeanCloud.<SetClient>c__async0:MoveNext() (at Assets/Scripts/LeanCloud/ChatClientManager.cs:52)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
关注 2 回答 2
幸运 关注了用户 · 2019-04-24
"Life's simple , you make choices and you don't look back."
"Life's simple , you make choices and you don't look back."
关注 4563
幸运 关注了用户 · 2019-04-24
Success is not final, failure is not fatal, it is the courage to continue that counts.
Success is not final, failure is not fatal, it is the courage to continue that counts.
关注 772
查看全部 个人动态 →
(゚∀゚ )
暂时没有
(゚∀゚ )
暂时没有
注册于 2019-04-24
个人主页被 136 人浏览
推荐关注