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
精彩评论