java - 'org.apache.http.HttpEntity' is deprecated. How to solve this error in android studio? -
i'm using android studio api22 , have these errors:
'org.apache.http.httpentity' deprecated 'org.apache.http.httpresponse' deprecated 'org.apache.http.namevaluepair' deprecated 'org.apache.http.client.httpclient' deprecated 'org.apache.http.client.entity.urlencodedformentity' deprecated 'org.apache.http.client.methods.httppost' deprecated 'org.apache.http.impl.client.defaulthttpclient' deprecated 'org.apache.http.message.basicnamevaluepair' deprecated 'org.apache.http.params.basichttpparams' deprecated 'org.apache.http.params.httpconnectionparams' deprecated 'org.apache.http.params.httpparams' deprecated 'org.apache.http.util.entityutils' deprecated
how can solve this?
add gradle
uselibrary 'org.apache.http.legacy'
example
android { compilesdkversion 23 buildtoolsversion "23.0.1" defaultconfig { minsdkversion 14 targetsdkversion 23 versioncode 2 versionname "1.0.1" } buildtypes { release { debuggable false signingconfig signingconfigs.releaseconfig minifyenabled true shrinkresources true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } debugsigned { debuggable true signingconfig signingconfigs.releaseconfig } debug { debuggable true } } uselibrary 'org.apache.http.legacy' }
Comments
Post a Comment