使用android向onenet物联网云平台请求数据 在manifest加入<uses-permission android:name="android.permission.INTERNET"/>,如图所示: 在xml文件夹中创建一个名为“network_security_config”的xml文件,如图所示: 其内容为: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config cleartextTrafficPermitted="true"> <trust-anchors> <certificates src="system" /> </trust-anchors> </base-config> </network-security-config> 由于本人是用okhttp进行网络请求的,所以需要在build.gradle中加入此句: implementation 'com.squareup.okhttp3:okhttp:3.10.0'...