I accidentally deleted the pub-cache in my flutter sdk and now whenever I try to run my flutter app on the web I receive this error:
Finished with error: Invalid argument(s): A directory corresponding to fileSystemPath "/Users/xxxxx/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.1.15/build" could not be found
How can I resolve this issue?
I already tried to restore the pub-cache but it doesn't work.
How can I solve this?
Use flutter pub cache repair. It should solve the issue. See pub cache for reference.
I managed to solve the problem by downloading the flutter sdk again and adding web support.
I did solve the problem downloading again.
Deleted the SDK folder
Fresh Install of the SDK.
https://flutter.dev/docs/get-started/install/macos
Related
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
first post (sorry for noobish post). I've searched Google and all over StackOverFlow to solve the above query on VSCode but to no avail anybody that can help solve this error I'd be really grateful!
It just keeps loading with the following message: Initializing Flutter. This may take a few minutes.
Issue of error
This seems to be a issue with the Flutter installation, please make sure to delete your Flutter folder (the one you downloaded from the GitHub repo) and follow
these instructions for your platform, step by step.
It seems like you was upgrading your flutter but due to some reason its not completely upgraded. I think you should try again to upgrade your flutter
Try running flutter in the terminal. If there are any flutter or dart upgrades pending, this will check them and finish those. Then run a flutter doctor, just to make sure everything is running fine.
If you run the the following lines in the CMD:
flutter channel dev
flutter upgrade
and it kept downloading till the message
Running pub upgrade...
then Close the CMD and for the message
"Initializing Flutter. This may take a few minutes"
Upgrading will actually take place in the Ide till it finishes
that's it :)
I thinks replace folder flutter with download new flutter version can cut off time initializing flutter.
I tired waiting initializing by "flutter upgrade"
It is due to flutter upgrade. flutter upgrade is for upgrading your existing version of flutter.
So, Don't worry. This will take 5-10 minutes to upgrade. After you will be getting the updated flutter upgrades.
I switched flutter to master channel to create bundle (flutter build appbundle)
but it's showing some error
Can you please help me on this?
Screenshot: https://prnt.sc/qbeulk
Looks like the bin/flutter file was corrupted due to permission issue. You may need to reinstall flutter SDK to fix the issue as your flutter bin file is missing.
Here is the installation manual: https://flutter.dev/docs/get-started/install
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.
I am able to run the app in android studios but whenever I try in xcode I get a flutter framework not found.
upgrade your flutter by doing
flutter upgrade
and it will upgrade the engine and download necessary tools.
This will even kill flutter daemons.
And run the application again
flutter run
Make sure you open .xcworkspace (and not .xcodeproj in XCode).
Ensure you have 'Flutter.Framework' listed under "Linked Frameworks and Libraries". If not, just drag and drop it from the main project. Like below
I was facing the same error whene I try to archive in Xcode
I fixed it by
flutter upgrade
and
flutter run
I fixed this by switching to the master channel, and switching back to the stable channel. Also remember to run 'flutter upgrade' after switching.
Delete the flutter directory.
Download new flutter
Extract it and put it where you want.
Run the command export PATH="$PATH:`pwd`/flutter/bin"
if the command does not work then specify your path like bellow
export PATH="$PATH: /Users/{your user name}/Documents/src/flutter/bin"
Restart your machine and you are ready to go.
After that - inside your project's ios directory -
delete the .symlink directory
delete the Pods directory
delete the Podfile.lock file
and now run -
flutter clean
flutter packages upgrade
flutter build ios
For me nothing worked except, deleting my flutter files fully and reinstalling.
Use this flutter docs for reinstallation: Flutter Installation Link
I tried everything nothing worked except:-
Flutter upgrade
Flutter run
and boom- Build succeeded!
Please try the following steps:
Delete the flutter SDK
Download the same flutter SDK and re-install it
restart the android studio
It should be worked well.
Fixed by switching branches from beta to master