This is my url in Network Module:
private const val BASE_URL = "http://localhost:192.168.29.20/api/"
I got this error:
Caused by: java.lang.IllegalArgumentException: Invalid URL port: "*************"
This is my url in Network Module:
private const val BASE_URL = "http://localhost:192.168.29.20/api/"
I got this error:
Caused by: java.lang.IllegalArgumentException: Invalid URL port: "*************"
2
Answers
It should be
"http://Your_4numbers:Your_Port/api/"
.Probably you want something like
"http://192.168.29.20:some_number/api/"
where "some_number" is for the port you are trying to use.Instead of giving "localhost:" prefix, give only the ip "http://192.168.29.20/api/"