VerifyError in web-service operation using SOAP on

2019-01-20 19:04发布

问题:

I am getting java.lang.VerifyError in call Webservice communicator class.

This Error is seen only in Android 4.2 O.S devices. And its working well on all other devices of OS and Tabs too.

below are my logs:

01-09 06:15:10.263: E/AndroidRuntime(785): FATAL EXCEPTION: Thread-78
01-09 06:15:10.263: E/AndroidRuntime(785): java.lang.VerifyError: org/ksoap2/SoapEnvelope
01-09 06:15:10.263: E/AndroidRuntime(785):  at com.weg.ecatalogue.servercommunication.WebServiceCommunicator$2.run(WebServiceCommunicator.java:78)
01-09 06:15:10.263: E/AndroidRuntime(785):  at java.lang.Thread.run(Thread.java:856)

Please suggest me, about this 4.2 OS dependent issue.

回答1:

Use this jar file for call soap webservices

ksoap2-android-assembly-2.6.2-jar-with-dependencies .jar

And replace AndroidHttpTransport class to HttpTransportSE