There is a very strange problem in HTC one ... Error calling Ksoap

Source: Internet
Author: User

Also on a statistical site to see our app burst out such a bug:

Java.lang.NoSuchFieldError:No instance field headerout of type [lorg/kxml2/kdom/element; in class lorg/ksoap2/ Serialization/soapserializationenvelope; or its superclasses (Declaration of & #x27;org.ksoap2.serialization.soapserializationenvelope& #x27; appears in /system/framework/wifi-service.jar)
At Com.example.hitpool.common.CommonFun.KsoapOpen

....

Confused, a look at the model HTC ONE_M8

Various search, find

Finally in http://stackoverflow.com/questions/28339539/ App-crash-on-device-htc-m8-with-os-lollipop-for-web-service-call found clues and solutions,

It turns out that some of HTC's NC it looked obvious someone in HTC thought it would is a good idea to include KSOAP2. Unfortunately they didn ' t think this through and made the same mistake as Google with Apache Commons and HttpClient, so: ...

The solution for the moment is only to rename the Ksoap jar package ...

Learned to repackage the named Jar package with Jarjar. Benefits can be referenced in this article:

Jarjar: Convenient Java packaging tool: http://blog.csdn.net/zzljlu/article/details/6907064

The result is renamed Jar package, then reference, is OK, just did not run on HTC, should be OK

There is a very strange problem in HTC one ... Error calling Ksoap

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.