Wednesday, May 1, 2013

[android help] java.lang.IllegalArgumentException: Illegal character in query at index 136 in Android

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








Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.


















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.





























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






















you try



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



















default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...