could not open proj generic class cache for build file flutter - flutter

OR
failure build failed with an exception. in flutter
enter image description here
PS F:\flutter project> flutter clean
PS F:\flutter project> flutter upgrade
enter image description here
version change 7.6
enter image description here
Pub get
finally project run error gone

open terminal type
PS F:\flutter project> flutter clean
PS F:\flutter project> flutter upgrade
version change 7.6
distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip
pubspec.yaml
Pub get
and project run
error gone

Related

Image picker flutter issue

when I try to use image_picker and run the flutter project it gives me error
A problem occurred configuring project ':image_picker_android'.
Could not load compiled classes for build file 'C:\Users\ZerpSteve\Documents\flutter_windows_2.10.2-stable\flutter.pub-cache\hosted\pub.dartlang.org\image_picker_android-0.8.5\android\build.gradle' from cache.
Use this command in your flutter project folder and rerun your project.
flutter clean && flutter pub get

Gradle (Flutter) does not use the cache

I'm giving Flutter a try, I'm totally new.
I added gradle in:
[project_directory]/android/gradle/wrapper/gradle-wrapper.properties:
distributionUrl=file:///run/media/me/gradle-7.2-all.zip
The first time I ran the flutter run command all dependencies were downloaded. But now when I create a new project, it downloads them again from the internet and doesn't use the previous cache. In fact, if I change something in pubspec.yaml, like adding assets, when I run flutter run it tries to download the internet dependencies again.
Am I missing any settings here?
Flutter 3.1.0 | Dart 2.18.0 | Gradle 7.2 | Linux
for .yaml run 'flutter pub get' command in terminal

pub run build_runner build has error (66)

hey guys i have error after using command : flutter pub run build_runner build
error message :
C:\Users\matin\AndroidStudioProjects\mosito>flutter pub run build_runner build
Could not find a file named "pubspec.yaml" in "C:\Users\matin\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\async-2.8.1".
pub finished with exit code 66
i try flutter pub upgrade and a lot of things from google but problem not fixed
NOTE: im new to flutter i want use this command for making .g.dart file for my models thanks for your attention
I think may be you are not in your project directory. Suppose you have a project name A in myfolder in C drive of your computer. First goto myfolder with terminal. after that try below code to build the project...
flutter packages pub run build_runner build --delete-conflicting-outputs
Turn on Your Terminal and Run
flutter doctor
if it is showing
Could not find "flutter"
Then you need to install flutter Correctly You Can check :
https://docs.flutter.dev/get-started/install/windows

flutter pub get won't download dependency

I deleted a package manually from Dart Package directory and deleted pubspec.lock. Now when I do flutter pub get it does not download that package again. I tried flutter clean && flutter pub get but it's not working as well. Please help I can't build my project now.
You can try to close and then open the editor and try:
flutter clean
flutter packages get
flutter packages upgrade

pub get failed (66; Could not find a file named "pubspec.yaml" in "C:\Windows\System32"

fatal: not a git repository (or any of the parent directories): .git Could not find a file named "pubspec.yaml" in "C:\Windows\System32". pub get failed (66; Could not find a file named "pubspec.yaml" in "C:\Windows\System32".)
hi everyone
I got this error message every time when I tried to create a flutter project by an android studio or by cmd
I checked flutter doctor command and appear no problems about flutter installation
so any advice about this problem?
[error message when I used android studio 1
flutter doctor message
You can try below steps:
First, you reboot(restart) your PC.
Before opening anything, you delete your flutter folder.
Unzipped a new flutter installation into the same directory.
Inside your project directory You run flutter packages get
Then open the IDE and everything will be working.
Refer flutter issue for more information.