Java.lang.IllegalArgumentException: Invalid character in query at index 136 on Android

ERROR / java.lang.IllegalArgumentException (337): java.lang.IllegalArgumentException: Invalid character in request with index 136

I get this error when I try to send data and image.

+4
source share
3 answers

try

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

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

+7
source

i your name The string checks the character at position 337 if it is an undesirable empty space in which this error is used. Replace white spaces with cropping

+1
source

All Articles