Cannot resolve symbol HttpGet,HttpClient,DefaultHttpClient in Android Studio

后端 未结 4 1196
小蘑菇
小蘑菇 2020-12-20 06:29

Hi I am new for android in my app I am integrating with services so when I import all these jar files. It gives an error :

Cannot resolve symbol Ht

4条回答
  •  悲&欢浪女
    2020-12-20 07:25

    HttpClient was deprecated in API Level 22 and removed in API Level 23

    So if your target API Level 23 or >=23 then you need to use

    useLibrary 'org.apache.http.legacy'
    

    in build.gradle file.

    Also this is the good library http://loopj.com/android-async-http/ which support API level 23 and also >=23

提交回复
热议问题