Java.Lang.Noclassdeffounderror:Failed Resolution of :Lorg/Apache/Http/Protocolversion

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/params/BasicHttpParams;

If you are using the Apache HTTP client, add the following in AndroidManifest.xml:
refer this

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

Android Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion

Put this in the Manifest <application> tag:

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

More info:
https://issuetracker.google.com/issues/79478779

Failed resolution of: Lorg/apache/http/client/methods/HttpPost

add this line in your application tag of your manifest.xml

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

NoClassDefFoundError: Failed resolution of: Lorg/apache/http/conn/ssl/DefaultHostnameVerifier;

I tried by adding following dependency. Now it's working fine for me

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
</dependency>

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory

This is an AWS SDK bug that appears to be solved in version 2.6.30 of the SDK:

Fixed a bug where getting a logger using Apache Commons Logging would
crash starting Android 9.0 (Pie / API Level 28). See pull #521. Now,
Apache Commons Logging would be used if it's being added as a
dependency, otherwise android.util.Log will be used.

FATAL EXCEPTION java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/util/Args

I was also working on apache stuff, and I run into that error.
I was able to fix it by downloading the .jar and then link it in the project settings manually.

You should move the jar under your app/build/libs
Files >> Project Structure >> Dependencies >> + >> File Dependencies >> and then change it to provided instead of compile (compile will cause a java exit with nonzero value 1 if you are importing too much jars)



Related Topics



Leave a reply



Submit