2

In my android app I'm trying to make a POST to a particular URL. The app makes several POSTS to other URLS without any issues and works fine in the simulator. This one URL always throws

java.net.UnknownHostException: Unable to resolve host "xxxx-xxxx": No address associated with hostname

If I open a browser both on my mac and on the simulator I CAN navigate to the URL!

Anything I try in java code throws an exception

For example

HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();

throws

java.net.UnknownHostException: Unable to resolve host "xxxx-xxxx": No address associated with hostname

The URL looks something like this...

http://xxxx-xxxx-zzzz:8080/risk-restapi/catest/Advanced/eval

Any ideas why java does not like this URL. The URL works fine in Xcode and an Objective C iOS app!

thanks in advance...!

2
  • I would suggest trying to re-connect WiFi as explained on this stackoverflow.com/questions/19951466/… thread then add your result to your posted question. Commented Jun 23, 2016 at 19:09
  • I tried that. Other URL work fine in the app before and after making this call. Must be something with the URL. Wonder why iOS / Xcode does not have an issue with it. Commented Jun 24, 2016 at 12:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.