Android Google Maps Java.Lang.Noclassdeffounderror: Failed Resolution Of: Lorg/Apache/Http/Protocolversion

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

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)

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>


Related Topics



Leave a reply



Submit