Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient
I am not able to resolve below error :
You are getting this error because your app uses the legacy org.apache.http.legacy client and your app's targetSdkVersion is set to 28 or higher.
Consider using HttpURLConnection or lowering your targetSdkVersion in build.gradle.
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