mcfly soft
mcfly soft

Reputation: 11665

DefaultHttpClient NoClassDefFoundError when switching to targetSdkVersion 28 (Android)

My app works perfect with

targetSdkVersion 26

but when switching to

targetSdkVersion 28

I get an java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient

any hints , ideas ?

Upvotes: 1

Views: 476

Answers (1)

NikhilReddy
NikhilReddy

Reputation: 6954

Add the following to your manifest file under 'application':

<uses-library android:name="org.apache.http.legacy" android:required="false"/>

https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p

Upvotes: 2

Related Questions