Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 2.96 KB

README.md

File metadata and controls

56 lines (48 loc) · 2.96 KB

VolleySampleForGithub2

Links:

  1. https://stackoverflow.com/questions/50705527/volley-1-1-dependency-on-org-apache-http
  2. https://github.com/google/volley/wiki/Migrating-from-Apache-HTTP
  3. https://developer.android.com/about/versions/pie/android-9.0-changes-28 See "Apache HTTP client deprecation"
  4. google/volley#346 My thread on Volley

Problems:

  1. Main problem Run "NetworkCallSampleJavaTest" Get: java.lang.NoClassDefFoundError: org/apache/http/StatusLine at com.example.volleysampleforgithub.NetworkCallSampleJavaTest.simpleVolleyTest(NetworkCallSampleJavaTest.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58) Caused by: java.lang.ClassNotFoundException: org.apache.http.StatusLine at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:419) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:352) ... 23 more
  1. Supplemental problem If I modify build.gradle and AndroidManifest.xml to include "org.apache.http.legacy" (see commented out sections) then I get: java.lang.UnsupportedClassVersionError: org/apache/http/StatusLine has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0