1.java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory解决方法 导入commons-logging-1.2.jar 2.Cleartext HTTP traffic to xxxxxxx not permitted 1.在res文件夹下创建一个xml文件夹,然后创建一个network_security_config.xml文件,文件内容如下: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config cleartextTrafficPermitted="true" /> </network-security-config> 2.接着,在AndroidManifest.xml文件下的application标签增加以下属性: <application ... android:networkSecurityConfig="@xml/network_security_config" ... /> 完成,这个时候App就可以访问网络了。 参考网址:https://blog.csdn.net/xiaoqiang_0719/article/details/83374980