解决办法: 在build.gradle中 在buildToolsVersion下边 defaultConfig上边 添加如下代码: useLibrary'org.apache.http.legacy' 如图: