The APK is compiled, but when I attempt to run the app on the Android P emulator is giving an error:
java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
My build.grade file:
android {
compileSdkVersion 'android-P'
buildToolsVersion '28-rc1'
useLibrary 'org.apache.http.legacy'
//for Lambda
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
Can someone explain to me why this error is coming?