android api23找不到HttpClient,HttpGet等解决方法

android api23抛弃了HttpClient,HttpGet和DefaultHttpClient,许多基于HttpClient第三方库android-async-http,android-ImageLoader等都要引用HttpClient,解决方法:在模块的build.gradle文件中声明依赖,如下:

android {
    useLibrary 'org.apache.http.legacy'
}

参考:https://segmentfault.com/q/1010000003485808/a-1020000003486019

你可能感兴趣的:(gradle问题)