I stumbled upon this error when I was testing my app on an actual android device. Running the app on the device seemed fine using run and debug, but then I built an apk and installed it without debugger.
Then the problem appeared.
The login, which took less than a second before, was taking forever. It wasn't right. Something has gone wrong.
I immidiately looked up a log on the login, and found out this error.
SocketException : Failed Host Lookup
Internet connection is guaranteed on the editor environment, but on the mobile, it isn't. On the android device, internet permission is required, and that was what I missed.
<uses-permission android:name="android.permission.INTERNET"/>
Just adding this line inside the AndroidManifest.xml solves the problem. Sometimes, simple thing is easy to forget.