Giter Site home page Giter Site logo

Comments (26)

brothersully avatar brothersully commented on May 29, 2024 2

@brothersully Nah, nothing has worked out for me yet.

@Suvrat31 I've got some good news for you. I've finally solved this issue. On your network.dart file you must've used a line Geolocator()..forceAndroidLocationManager = true;
The emulator doesn't return the location without this line of code but the physical device does. This solved the issue. Hope it helps you too! If it doesn't let me know.

from flutter-course-resources.

Aatashh avatar Aatashh commented on May 29, 2024 1

Can you use a physical device?
Try to invalidate cache and restart the android studio

Just connected the phone physically and it worked :) thanks

from flutter-course-resources.

Kovalchik8 avatar Kovalchik8 commented on May 29, 2024 1

Anyone found it? i have the same problem aswell

Have you read my answer above? I wonder why it hasn't helped anybody yet.

from flutter-course-resources.

gupta-shrinath avatar gupta-shrinath commented on May 29, 2024

Can you provide your code, please?

from flutter-course-resources.

brothersully avatar brothersully commented on May 29, 2024

same issue man. I've been banging my head over this. Have you found a solution??

from flutter-course-resources.

Suvrat31 avatar Suvrat31 commented on May 29, 2024

Can you provide your code, please?

It is the same code they use in the videos. You can check out their final solution codes repo

from flutter-course-resources.

Suvrat31 avatar Suvrat31 commented on May 29, 2024

same issue man. I've been banging my head over this. Have you found a solution??

@brothersully Nah, nothing has worked out for me yet.

from flutter-course-resources.

gupta-shrinath avatar gupta-shrinath commented on May 29, 2024

You have created your own OpenWeatherMap API, right? Can you provide the console output?

from flutter-course-resources.

moumitb avatar moumitb commented on May 29, 2024

Anyone got any solution, for this issue?

from flutter-course-resources.

gupta-shrinath avatar gupta-shrinath commented on May 29, 2024

@moumitb You have created your own OpenWeatherMap API, right? Can you provide the console output?

from flutter-course-resources.

Kovalchik8 avatar Kovalchik8 commented on May 29, 2024

To get it work on Emulator:

  1. Open settings -> Location -> Set location
  2. Open google maps and locate your device
  3. Reload the app

To get it work on Physical Android devise:

  1. Goto android/app/src/main/AndroidManifest.xml and add <uses-permission android:name="android.permission.INTERNET"/> just before the <application> tag (https://stackoverflow.com/questions/62261690/flutter-app-gets-stuck-at-loading-screen)

from flutter-course-resources.

Aatashh avatar Aatashh commented on May 29, 2024

F/crash_dump32(23307): crash_dump.cpp:246] target died before we could attach (received main tid = 23305)

what is this error on my consol?

from flutter-course-resources.

gupta-shrinath avatar gupta-shrinath commented on May 29, 2024

Maybe Aatashh your device got disconnected

from flutter-course-resources.

Aatashh avatar Aatashh commented on May 29, 2024

Maybe Aatashh your device got disconnected

I am using Emulator :(

from flutter-course-resources.

gupta-shrinath avatar gupta-shrinath commented on May 29, 2024

Is it happening recursively?

from flutter-course-resources.

Aatashh avatar Aatashh commented on May 29, 2024

Is it happening recursively?

yes even after fully closing and opening the android studio, I am not missing anything and I am comparing the code and its 100% matching

from flutter-course-resources.

gupta-shrinath avatar gupta-shrinath commented on May 29, 2024

Can you use a physical device?
Try to invalidate cache and restart the android studio

from flutter-course-resources.

Bhavay-2001 avatar Bhavay-2001 commented on May 29, 2024

The final build output of the app doesnt load the weather from the OpenWeatherMap API and is stuck on the loading screen, while it works when the app is in testing mode. There are no network issues or GPS issues with my device. Kindly check the app by installing it from the zip file below.
app-release.zip

Having the same problem i even tried the internet permission still the app gets stuck at the load screen . :(

from flutter-course-resources.

Bhavay-2001 avatar Bhavay-2001 commented on May 29, 2024

plss help me with a suitable solution

from flutter-course-resources.

MuhammadSabah avatar MuhammadSabah commented on May 29, 2024

Anyone found it? i have the same problem aswell

from flutter-course-resources.

MuhammadSabah avatar MuhammadSabah commented on May 29, 2024

the Set Location button is disabled i cant click on it

from flutter-course-resources.

MuhammadSabah avatar MuhammadSabah commented on May 29, 2024

A fixed device location but still it doesn't go to the next page 😔

from flutter-course-resources.

aditmo avatar aditmo commented on May 29, 2024

You need to provide internet access to your app by enabling it in AndroidManifest.xml . So go to app -> src -> main -> AndroidManifest.xml. and paste this code- <uses-permission android:name="android.permission.INTERNET" />

from flutter-course-resources.

aditmo avatar aditmo commented on May 29, 2024

The final build output of the app doesnt load the weather from the OpenWeatherMap API and is stuck on the loading screen, while it works when the app is in testing mode. There are no network issues or GPS issues with my device. Kindly check the app by installing it from the zip file below.
app-release.zip

You need to provide internet access to your app by enabling it in AndroidManifest.xml . So go to app -> src -> main -> AndroidManifest.xml. and paste this code- uses-permission android:name="android.permission.INTERNET" />

from flutter-course-resources.

raunakmitra1 avatar raunakmitra1 commented on May 29, 2024

Hi guys,

I was facing this problem and I added <uses-permission android:name="android.permission.INTERNET" > to my AndroidManifest.xml file. Also in the location.dart file, in the services folder I changed the Geolocator positioning from low to high. I tried setting it to medium, but that did not work and the app remained stuck in the loading screen. Only when I changed it to high did I get the app start working correctly.

Initial
Position position = await Geolocator().getCurrentPosition(
desiredAccuracy: LocationAccuracy.low);

Changed
Position position = await Geolocator().getCurrentPosition(
desiredAccuracy: LocationAccuracy.high);

from flutter-course-resources.

 avatar commented on May 29, 2024

Hi!

I was also facing this problem, but no solution worked. As the issue is still open, if none of the solutions from above worked, then here's what I've found. (note: this works if you haven't changed the _appid under weather.dart from the source code)

Check your console and see if there's any unhandled exception. I didn't notice it at first, but in my case, the openwheathermap api gave an error: [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: HttpException: Responded with 401, uri = https://api.openweathermap.org/data/2.5/weather?appid=c029cfbbee8e7d8e8aa732f185cddd4a&units=metric&lat=14.6912167&lon=121.02661

The API key of the original code probably expired already (or something similar to that). So what you need to do is the following:

  1. Go to https://openweathermap.org/price and set up a Free subscription account.
  2. After the setup, on the NavBar > Account tab > My API Keys image
  3. Get the Key (copy it)
  4. Under weather.dart, replace the value of static const _appid with the Key (select the string and paste it)
  5. Restart the application

Important things to note:

  1. Doesn't accurately display the City name sometimes.
  2. Solution by raunamiktra1 has been implemented.

    Initial
    Position position = await Geolocator().getCurrentPosition(
    desiredAccuracy: LocationAccuracy.low);

    Changed
    Position position = await Geolocator().getCurrentPosition(
    desiredAccuracy: LocationAccuracy.high);

  3. Solution by Kovalchik8 has been implemented.

    Goto android/app/src/main/AndroidManifest.xml and add <uses-permission android:name="android.permission.INTERNET"/> just before the <application> tag (https://stackoverflow.com/questions/62261690/flutter-app-gets-stuck-at-loading-screen)

Here's where I got the idea of why mine didn't work

from flutter-course-resources.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.