This solution often reports errors when uploading large images to the server using KSOAP2 in Android development,

Source: Internet
Author: User

This solution often reports errors when uploading large images to the server using KSOAP2 in Android development,

In the original article, I started my main blog

Http://anforen.com/wp/2017/04/android_ksoap2_unexpected_type_position_end_document_null_java_io_inputstreamreader/

 

Jpg image files are relatively small, such as about KB. Generally, no error is reported and can be uploaded successfully. When the Photo size is large, org. xmlpull. v1.XmlPullParserException unexpected type is often reported.
KSoap2 unexpected type (position: END_DOCUMENT null @ 1:1 in java. io InputStreamReader @ 414fae00.

After a lot of attempts, we finally found that we only need to update the ksoap2 version.

Originally
Ksoap2-android-assembly-2.5.2-jar-with-dependencies.jar

Update
Ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar
After, everything is normal.

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.