skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. Instead of giving "localhost:" prefix, give only the ip "http://192.168.29.20/api/"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search