When i update the Android application to support API 28 The app crash in device that run Android 9 and this is the error:

Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
   at lt.b(:[email protected]@30000.238272502.238272502:2)
   at ls.a(:[email protected]@30000.238272502.238272502:1)
   at lu.a(:[email protected]@30000.238272502.238272502:18)
   at com.google.android.gms.ads.internal.util.ar.a(:[email protected]@30000.238272502.238272502:10)
   at kx.a(:[email protected]@30000.238272502.238272502:7)
   at kx.run(:[email protected]@30000.238272502.238272502:2) in firebase Crashlytics

How to solve this?

1 Answers

0
Marcin Orlowski On Best Solutions

Apache HTTP client deprecation

With Android 6.0, we removed support for the Apache HTTP client. Beginning with Android 9, that library is removed from the bootclasspath and is not available to apps by default.

To continue using the Apache HTTP client, apps that target Android 9 and above can add the following to their AndroidManifest.xml:

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

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