开发者

java.lang.IllegalArgumentException: Illegal character in query at index 136 in Android

ERROR/java.lang.IllegalArgumentException(337): java.lang.IllegalArgumentException: Illegal character in query at index 136

I am getting 开发者_运维知识库this error when I'm trying to post data and image.


you try

String link="http://example.php?string1="+URLEncoder.encode(string1)+"&string2="+URLEncoder
.encode(string2)+"&string3="+URLEncoder.encode(string3)+"&string4="+URLEncoder.encode(string4)+"";


Try URLEncoder.encode(String) or HTML.fromhtml()


i your name String check the character at position 337, if it is to be a unwanted white space this error use to occur. Replace the white spaces by using trim

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜