Flutter Error (E/LB: fail to open file: No such file or directory) - Flutter - flutter

first of all these errors just appears when i run the app on a real device
the app runs perfectly on android studio emulator
i'm using android studio and Getx package for my flutter project
right after running the app on real device this error appears
E/LB ( 4438): fail to open file: No such file or directory
and after opening the drawer in the app => this error appears
V/MiuiFrameworkFactory( 4438): get AllImpl object = android.common.MiuiFrameworkFactoryImpl#71c94b4
W/MirrorManager( 4438): this model don't Support
and the app doesn't change to the dark mode when i press the change theme button i made
anyone can explain these errors for me , and how can i fix this ??

Related

After flutter new project creation I can't locate the main dart file to start programming

I have installed Android Studio and flutter successfully. When I run flutter doctor in command prompt it gives me [all green ticks in these brackets].
The question is that after the creation of a new flutter project on the right-hand side of the screen under the project I am unable to see/locate any dart main file to write code. For further clarification, you can see the attached image below.
Unable to locate the dart file to write code in the project hierarchy:
I have 0 ideas what is still missing in the configuration of Flutter / Android Studio
Well, I figured out why pubspec.yaml and main.dart was not in my project due to the older version of flutter. I downloaded the latest version flutter_windows_2.2.2-stable, created a new flutter project, and included the flutter SDK path of flutter_windows_2.2.2-stable which resolved all my problems. Kindly, make sure whoever wants to start Mobile Application development in Android Studio + Flutter + Dart always download the latest version of everything.
Recent Experiment:
After downloading the latest version of Flutter still, I was unable to get the pubspec.yaml and main.dart files in my Android Studio Project, so the solution is below:
where you have extracted your flutter_windows_2.2.2-stable remember the directory path like E:\src\flutter_windows_2.2.2-stable which is in my scenario.
******************* CMD WORK *******************
Open cmd(Command Prompt) by default you will be in the directory like C:\Users\UserName\
Now go to the path E:\src and to navigate write E: hit enter, now you will be in the E: directory. Write cd E:\src hit enter.
type flutter create project_name ( make sure whenever you withe the name of the project it should be like this my_first_app in this format you name the projects with proper naming convention in flutter [word_word_word_word] ) then hit enter, wait for a while it will create a new flutter project for you including pubspec.yaml and main.dart files + necessary files to be imported.
Reference for naming convention in flutter (https://medium.com/flutter-community/file-and-folder-structure-in-flutter-967b8be3155e#:~:text=Flutter%20doesn't%20have%20a,letters%20and%20underscores%20between%20words.&text=When%20naming%20folders%2C%20you%20want,them%20very%20direct%20and%20clear.)
Right now after the creation of a project(Flutter) in Android Studio you are unable to see/locate the pubspec.yaml and main.dart files use cmd for the project creation which worked in my scenario.

Flutter Xcode build produces error 'Parse issue: Module not found'

My flutter build runs on simulators perfectly fine through visual studio code, tried cleaning, reinstalling pods etc but no luck. When I wanted to Archive and do a build on any device I would always get a 'module not found' error in the GeneratedPluginRestraint.m
When you open the project in Xcode, you must open the Runner.xcworkspace instead of the Runner.xcproj file!

Flutter Web crashes with Cannot open file client.js

May I ask your help about this error
It's happen when I'm trying for the first time running my flutter web which using flutter run -d chrome
Launching lib\main.dart on Chrome in debug mode...
Syncing files to device Chrome...
25,220ms (!)
GET /dwds/src/injected/client.js
Error thrown by handler.
FileSystemException: Cannot open file, path = 'C:\Users\Acer\flutter\.pub-cache\hosted\pub.dartlang.org\dwds-2.0.1\lib\src\injected\client.js' (OS Error: The system cannot find the path specified.
, errno = 3)
dart:isolate _RawReceivePortImpl._handleMessage
And if I trying run using
flutter run -d web
It's doesn't thrown any error but on the website it goes blank white nothing shown up.
Anyway thanks for your help
adding the following in the pubspec.yaml worked for me. I am using beta channel.
dependencies:
dwds: ^16.0.1
then run command:
flutter update-packages
I was also facing the same issue, I don't know the exact root cause of the problem but I have a hack to make it work.
I was facing the issue after I deleted .pub-cache folder, so from my recycler bin I picked dwds-2.0.1 folder and reverted back. This hack working
add dwds package in your dependencies and run flutter update-packages. It will work :)

Create new flutter project giving an error, "flutter SDK is not found"

I am trying to create new Flutter project using VSCode, it gives an error
"Could not find a Flutter SDK. Please ensure flutter is installed and in your PATH (you may need to restart). "

new flutter project in vscode has error

when i create a new flutter project in vscode it will immediately shows an error in the main.dart file and gives a gradle error when trying to debug.
shown here: main.dart error
"compiler message: lib/main.dart:68:19: Error: Too few positional arguments: 1 required, 0 given."
I've reinstalled dart and flutter plugins. updated the java install.
in debug console i get this:
debug console
added output of flutter doctor -v
enter image description here
I was also facing the same error, but it was always on my test folder.
This is what I did:
On your terminal, make sure you are in your project repository.
Run the flutter pub get command, it worked for me, may be you
should try it too.
Do you possibly have two different versions of the Flutter SDK on your machine? I wonder if one is being used by flutter create and the other for analysis.
If you're sure you only have one, please open an issue on GitHub and attach a log file for me to investigate.