Closed Ankur-Khandelwal closed 4 years ago
@Ankur-Khandelwal Add internet permission in the AndroidManifest file and it will work as expected.
<uses-permission android:name="android.permission.INTERNET"/>
@amitkhairnar44 I created a new apk and tested the app again after adding the line as mentioned by you, but still it's not working.
Do flutter clean and try again
Yes @amitkhairnar44 , I did that as well. Still its not working.
Okay I'm gonna clone and check the code.
@Ankur-Khandelwal Check if you're able to get the user location. In my case the code has hit deadlock.
This code is causing the issue. Since it's not able to get user's current location due to some factors, it will wait for infinite time and that's why you're seeing the loading screen for long time.
@amitkhairnar44 Why is it not getting the location? Because while trying over Android Studio, it was working perfectly.
@amitkhairnar44 Why is it not getting the location? Because while trying over Android Studio, it was working perfectly.
Maybe it's not getting GPS lock.
On starting the app, it should show a loading animation while fetching local weather data from Open Weather Map API and then navigate to a screen showing the weather details. But thats not happening. Rather it just keeps showing the loading animation only.
The app works perfectly fine, when run on a device through Android Studio over USB. However, when I created an apk file for the same and installed the app on a device through the apk file, its stuck on the loading screen only.
I generated the apk through:
flutter build apk --split-per-abi