java.lang.IllegalArgumentException: Illegal URL with retrofit

后端 未结 3 500
梦毁少年i
梦毁少年i 2020-12-21 00:19

i\'m trying to call an api in my application i\'ve the following url template

test-test.domainname.com/feeds/json/v3/attribute/attribute

3条回答
  •  死守一世寂寞
    2020-12-21 00:55

    You do not have a protocol section. Prepend http:// or https:// depending on which applies to your url --

    Retrofit retrofit = new Retrofit.Builder()
            .baseUrl("http://test-test.domainname.com")
            // ... other retrofit options
            .build();  
    

提交回复
热议问题