java.lang.RuntimeException: Invalid host name: http://localhost:9000. Hint: don't specify protocol (eg. http) or path

157 views
Skip to first unread message

Tuan

unread,
Nov 20, 2015, 3:06:52 AM11/20/15
to BaasBox
I've run Baasbox Domain 
and Initialize baasbox in Application
BaasBox.Builder b = new BaasBox.Builder(this);
client = b.setApiDomain(getString(R.string.baasbox_server))
.setAppCode(getString(R.string.baasbox_app_code))
.init();
but notification error when run my application: java.lang.RuntimeException: Invalid host name: http://localhost:9000. Hint: don't specify protocol (eg. http) or path
Who can help me?
thanks!

ymir

unread,
Nov 20, 2015, 10:35:37 AM11/20/15
to BaasBox
Hi Tuan,
are you using an emulator for testing?

Tuan

unread,
Nov 22, 2015, 9:18:32 PM11/22/15
to BaasBox
Yes, i using emulator for testing

ymir

unread,
Nov 23, 2015, 1:20:42 AM11/23/15
to BaasBox
Then you should use 10.0.2.2 instead of localhost.

Tuan

unread,
Nov 23, 2015, 2:19:38 AM11/23/15
to BaasBox
thanks ymir !

Tuan

unread,
Nov 26, 2015, 5:16:13 AM11/26/15
to BaasBox
hi ymir 
i using official host , but appear old Errors again
Invalid host name: "http://ip address:9000". Hint: don't specify protocol (eg. http) or path
can you help me again?

sory for my bad english :D

ymir

unread,
Nov 26, 2015, 6:03:41 AM11/26/15
to BaasBox
Hi Tuan,
it appears to me that you're using a wrong String resource for your Baasbox api domain initialization.
Check whether the String has a valid ip address.

Tuan

unread,
Nov 26, 2015, 10:28:34 PM11/26/15
to BaasBox
thanks Ymir
i fixed 
Reply all
Reply to author
Forward
0 new messages