0

在此处输入图像描述 我正在从 Android Studio 进行 API 调用。没有错误,但是当我在 ADB 运行时,我的应用程序停止说“不幸的是,该应用程序已停止”任何人都可以看看并告诉我我做错了什么吗?非常感谢

4

1 回答 1

0

您必须为您的应用程序设置 Workspace ID,您明白吗?

例子:

ConversationService service = new ConversationService("08-11-2016");
service.setUsernameAndPassword("{username}", "{password}");

MessageRequest newMessage = new MessageRequest.Builder()
  .inputText("Turn on the lights")
  // Replace with the context obtained from the initial request
  //.context(...)
  .build();

String **workspaceId** = "**ID from your conversation...**";

MessageResponse response = service 
  .message(workspaceId, newMessage)
  .execute();

System.out.println(response);
于 2016-11-08T19:35:43.367 回答