londonappbrewery / Clima-Flutter-Completed

The completed code for the Clima Project - The Complete Flutter Development Bootcamp

Home Page:https://www.appbrewery.co/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After build the apk and try to open it on phone, it stuck on the loading Screen

SANKARAMDAS opened this issue · comments

commented

After build the apk and try to open it on phone, it stuck on the loading Screen, on console I get this error-
" E/flutter (21270): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: SocketException: Failed host lookup: 'api.openweathermap.org' (OS Error: No address associated with hostname, errno = 7)
E/flutter (21270): "

I checked the internet and added these 2 line manually-
uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"

I already gave the permission to the app to access the internet on my phone. But still no luck. I checked the Api link- it's perfect on issue on it.
Any solution??

Not sure if you solved this problem. I also encountered this and got it by giving this permission
uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" in android manifest file.