Flutter 'cannot find symbol' - flutter

What can I do to fix this issue, when trying to debug on android phone OR emulator?
http://prntscr.com/pp43k4
Ive tried reinstalling whole flutter, and still the same issue.
the project is on flutter version 1.7.8. Tried going to latest versions, still the same.

Try running flutter clean to clear the build artifacts - If the project was copied from another computer, or if you were using different version of flutter, that could help.

Related

'Flutter/Flutter.h' file not found on GeneratedPluginRegistrant.h - Flutter iOS

I am working on a Flutter project where the Android build is working totally fine, but the iOS build was broken by 'Flutter/Flutter.h' file not found on GeneratedPluginRegistrant.h file.
I have tried all possible solutions for upgrading my Flutter SDK, all dependencies, removing pod files and installing them again, even tried deleting the whole iOS project and recreating the iOS project and setup again.
Still, I am facing this issue.
Please consider the below screenshots for the flutter doctor and issues.
Please let me know the possible solution and what am I doing wrong here.
Looking for positive solutions, Thanks in advance.
This is because of a dependency. A package or plugin is not completely installed or there is an error in installation. Just try to flutter clean and flutter pub get few times and this will install all dependencies correctly and this error will be gone. Thank you

Breakpoints not working with Flutter in Android Studio

I can set breakpoints, but when I run in Debug mode the breakpoint's icon change with this:
I think that the problem is the new version of Flutter plugin in Android Studio, but I'm not sure. How to fix this?
What I've tried:
flutter clean
android studio cache clean and restart
Upgrade to the latest version of the flutter plugin 65.1.3 solved my problem.
https://plugins.jetbrains.com/plugin/9212-flutter/versions
need to roll back the version of the flutter plugin to 64.1.2.
https://plugins.jetbrains.com/plugin/9212-flutter/versions
Confirmed: plug-in was one thing.
The other problem is that IntelliJ (same for Android Studio) distinguish between:
import '../../viewmodel/**m**essages
import '../../viewmodel/**M**essages
Compiling, running, Dart analysis ... everything's fine. However, breakpoints don't work!
To be more precise: some breakpoints don't work, only in some files!
Tip: If a breakpoint does not work, remove all imports in the file. Click the bulb to get suggestions - and you will see the duplicate imports.
See wrong imports
Btw.: I am on Windows. And the file system does not distinguish between upper and lower case filenames.
Faced to this issue today as well: looks like for me the solution was to update Flutter / Dart SDK and their Plugins for Android Studio.
Some users report the problem is linked to the Chrom Version >=100 due to API change, but on my side it was not working with Edge as well.
After update problem has gone
There is indeed also an issue with Chrome Version >=100. Running flutter upgrade (to flutter 2.10.5) fixed this for me as described here

Flutter: When I debug my App, my App creates this files

My App have a Problem so I Need to do flutter clean before I can debug my app.
So I do flutter clean and after that flutter run in my Terminal.
Then my App debug. After that flutter creates a new build folder, new .flutter-plugins and .flutter-plugins-dependencies.
Now I think the problem is not there but sometimes it creates the files.
Can I delete the files? And how can I fix it?
PS: I have the newest version of flutter and Xcode. And I work with VSCode and I work on a MacBook with the newest Version.
I'm not sure about this, but in one case I tried adding resource permission from info.plist(I messed with internal storage permission), I noticed similar behaviour.

Unable to connect Dart DevTool to debug session

I'm getting following error while trying to connect devtool to debug app session.
getDartDevelopmentServiceVersion: (-32601) Method not found
I had the same problem a couple of days ago. I tried these methods and had no luck:
upgrading flutter and devtools (still on stable, just went to 1.22.6)
doing flutter clean
clearing the cache
reindexing in Android Studio
Finally I noticed there was a new release of Android Studio and upgraded it. This seems to have resolved the issue for me.
this may fix your problem temporarily, it seems there is some bugs with new feature
SWITCH channel to beta, if issue is fixed during the next week highly recommend you switch to stable.
flutter channel beta
flutter upgrade
or launch manually
with flutter pub global run devtools
and use a link to connect

Parameter format not correct - flutter run

Even when I run a new project in my device or emulator, during Assemble debug process a message appears in Debug Console 'Parameter Format not correct', but the app seems to run properly.
when I add 1-2 dependencies/ plugins, countless redlines occurs in Debug Console...
I don't know what is the reason and solution.
Sorry guys this happens every time you run a project build by the previous version of flutter... and this error is not a big deal... dont worry...
I have also faced the same issue. It started coming when I upgraded the flutter SDK to version 1.17.3. The easiest solution I can come up with is to downgrade the flutter SDK.
If you are using VS code then you easily switch between flutter SDKs from the bottom bar.
To add flutter SDK -
Goto file -> settings -> flutter SDK -> Add item
then you can give the path of other SDK.
If you are not using the VS code, change the path of SDK from environment variables.
If this doesn't work out, try changing the drive for SDK of flutter and android both.
Example- From D:\flutter to E:\flutter. I have not tried this but for my friend, it worked.
If none of these workes, just ignore this error. They might fix this in future upgrades.
it may be possible ,you have cloned the repo from github and trying to run on your local machine. just change the compileSdkVersion in android>app>build.gradle file, i was facing this issue and get it fixed now
android {
compileSdkVersion 30
}
I had the same issue, but it was fixed by running flutter doctor --android-licenses
I had the same issue try to change Your Environment variable path
If you're using VS Code, then you can try this process: Go to Settings -> Flutter SDK Paths -> click on Add Item. Then put the Flutter SDK location from your drive.
For example: C:\Flutter\flutter_windows_2.5.2-stable\flutter.
I hope it worked!!
Same problem, but it was fixed by running following command in terminal.
flutter doctor --android-licenses