[英]Unable to create a Thing in AWS IoT using AWS sdk for Android
How to create a Thing in AWS IoT using AWS sdk for android? 如何使用适用于Android的AWS开发工具包在AWS IoT中创建事物? Every time I try to execute my code it fails with a Network exception error.
每次我尝试执行代码时,它都会失败,并显示网络异常错误。 My target is to create a Thing with a Thing Name which will be visible in the AWS IoT dashboard.
我的目标是创建一个带有事物名称的事物,该事物在AWS IoT仪表板中将可见。 Below is what I tried.
下面是我尝试过的。
CreateThingRequest thingRequest = new CreateThingRequest();
thingRequest.withThingName("NewTestThing");
CreateThingResult thingResult = mIoTAndroidClient.createThing(thingRequest);
Providing android logs will be helpful. 提供android日志将很有帮助。 Also, do check that you are not running the snippet of code in the main thread.
另外,请检查您是否不在主线程中运行代码段。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.