java - How to add compile time dependency in eclipse -


in developer.android.com site saw below information under android 6.0 changes.

apache http client removal


android 6.0 release removes support apache http client. if app using client , targets android 2.3 (api level 9) or higher, use httpurlconnection class instead. api more efficient because reduces network use through transparent compression , response caching, , minimizes power consumption. continue using apache http apis, must first declare following compile-time dependency in build.gradle file:

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

problem:

i using eclipse , have used http client. use new httpurlconnection how can add dependency in eclipse ide? or have use android studio use new feature?

thanks looking , giving solution problem.

@senthilkumar s should use android studio .

uselibrary adds library classpath while compiling not bundle library application. courtesy @laalto sir .

please upgrade gradle tools version in build.gradle file of android studio , follows:

dependencies {     classpath 'com.android.tools.build:gradle:1.3.0' //2.3.0 } 

for more info can check

how add apache http api (legacy) compile-time dependency build.grade android m?


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -