Flutter - SocketException : Failed Host Lookup

Dr_Skele·2023년 3월 11일
0

Flutter

목록 보기
12/19

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.

profile
Tireless And Restless Debugging In Source : TARDIS

0개의 댓글