I am very beginner in flutter development so have very little knowledge about its working but need to clear my doubt.
I had created an app using flutter create command and a sample flutter project directory is created. When I opened the app using visual studio code and run the app over the physical device an app is created in my device and showing the basic increment counter feature on the screen which is due to the code written in main.dart file.
I remove all the content of main.dart file and wrote my code there and reload it. The app is working fine.
The problem is everytime when I connect my device with my computer I am getting the UI of the sample project created initially and only after reloading again I am getting my new UI.
This problem only exists when first time I am connecting my mobile for debugging and after reloading it is resolved.
Why I am getting the old UI (the one with counter generate while created app for the first time) even though there is no code regarding the same.
Thanks
This is happening because you are using hot reload only. Stop the app from the IDE and rebuild. Then after restarting the emulator will be no problem.
This is a kind of bug. I also faced the same problem and finally i fixed it using flutter clean from the terminal. Hope you also already fixed it.
Related
I am using Firebase in my project to get the data. Problem is when I run debug version app works fine and show the fetched data but when I create a release version of it and then open my application It's shows blank screen. It is strange and I am not getting why this happening. To understand the issue I have given the two videos of it and also the project repository link, and the problem I am facing in the Book_Screen.dart.
Project Link: https://github.com/jaydip-pawar/Hindi-Audio-Bible
In Debug Version:
In Release Version:
It is hard to catch problem in release mode. But you can try to open "Uncaught Exception" from the debug panel and if some error occurs, try to fix them.
If you can't solve the problem, you can comment widgets one by one. In this way, you can look for the specific lines of code that causes the error.
If you are using playstore inbuilt keystore, add those sha1 from playstore to firebase app setting.
I am new to flutter build some applications only. Currently, I was working on a small project with API every this was fine but when I build the release of the application it starts showing nothing (no API are able to load data)and I am unable to find what is a problem with my app. Tried almost every possible this I can find out.
already given all the permission that is required for the application.
any help will be appreciated.
thank you in advance.
Did you mentioned INTERNET permission in the mamifest file?
The app I have created seems to open quite slow (and janky) compared to other apps on my phone. It only seems to happen on android
I have tried copying the dependencies to a new project and running it and it doesn't replicate the same behaviour.
I have also changed the original app to only load a red container in the matierial app but its still really choppy on app launch before it loads.
I would post some code but I am not entirely sure whats wrong.
Sorry this is quite vague but I am running out of ideas. I dont really want to have to recreate everything in a new project.
Please note I have done the android v2 migration so it could potentially be linked to this?
Does anyone have any ideas to what could be causing it?
Update:
Forgot to mention this is on profile/release mode.. its not debug mode causing it
Well, it's hard to know why your app is being so "janky" but i'm going to make a few shots in the dark:
Are you running this on an emulator or on a real phone? Emulators will sometimes act weird, and will deliver results that you might not see on an actual android device. If you are running this on an emulator, try launching it on a physical phone. I have had experience with using Android emulators and sometimes trying to open the app at all becomes weird. How old your phone is might also be the cause of this, if it is old.
Do you have too many tabs open? Try exiting out of all of your applications and then open up your flutter app. See if that does anything.
That is all that I have concerning the environment that you are working in. You haven't posted any code, so i'm going to have to ask you about what your app is doing on startup. It would be good if you posted some code or a link to a git repository so that I can see that and be of better help.
If i'm right, google_fonts plugin loads font through http during debug. Later when our app is ready we have to download the font from the fonts.google.com . and store it in pubsec.yaml.
I am developing a flutter application where all the available fonts should be shown to the users. But if i can't fetch it in the runtime, i will have to download every file, which counts over a thousand. It might become difficult as my app size increases and i will have to manually download them all.
So my question is, can i fetch it in the runtime , or is there some other way to achieve it? Hope someone can answer me. Thank You
edit: It ran without problems. The problem was not with google_fonts, my code was not reflecting changes, so i got wrong release apk
When you just get that once. this should be work.means your project must not running .you must stop running then pub get.
weird issue happen me just, i'm trying to run my project and i saw other app with this photo
i opened a new project, even change the file directory and see the same image.
is this any issue with ionic 2??
i solved it by clear cache in chrome.