在build.gradle中的android {}中加上useLibrary 'org.apache.http.legacy' 转载于:https://www.cnblogs.com/zqxLonely/p/5507781.html