Android API 23 Removed packages

前端 未结 4 945
独厮守ぢ
独厮守ぢ 2021-01-06 09:24

What is the best replacement for org.apache.http ?

since they say this in Android API Differences Report .

Removed Packages in API 23

org.apa         


        
4条回答
  •  独厮守ぢ
    2021-01-06 10:13

    If you are updating your project and you want continue using the Apache HTTP APIs, you must declare the following in your build.gradle file: (More info here)

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

    Watch out about your gradle version used, I'm using 2.6 at my gradle-wrapper.properties

    distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
    

提交回复
热议问题