Here is How to Fix java.lang.NoClassDefFoundError in Android Studio

Android Studio How to Fix java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion

This is an error associated with the google-play-services libraries and the http apache library. To fix this, do the following

Add dependency

In your app-level build.gradle file, add the Maps dependency like below:

dependencies {     implementation '' }

Add the code below to androidmanifest.xml

This code should be inside the <application …/> element (direct child)

      android:required="false" />

That’s it, this should fix the error now


Post navigation


This site uses Akismet to reduce spam. Learn how your comment data is processed.