I was getting the same error. In my case, all my HTTP requests will work correctly for bits, and then I get the exception "java.io.IOException: hostname not checked", regardless of what I did until I restarted the application.
It turns out that the system clock on my Android device is off for about 2 minutes, which caused the SSL check to fail.
As soon as I set the time on my Android device, the exception no longer occurred.
source
share