I also ran the command flutter doctor --android -licenses but still it shows the error displayed in the image.
I also tried to install android sdk obsolete package from within Android Studio but the package is pre-installed.
What shall I do?
Please Help me, - thanks
Delete android studio permanently and config folder in "User" folder in C:\ . and Delete "SDK" and reinstall Android studio. it probably solve problem
I'm trying to use flutter on Android Studio. I have the flutter plugin installed on Android Studio and when i try to create a new flutter project it behaves normally, in the sense of it lets me write the project name, the flutter sdk path and so on. But when i click on finish absolutely nothing happens. I just see the Android Studio Welcome page where i can create new Projects. So i figured I'd see what flutter doctor -v has to say about it and it gives me these errors:
So i try to find a solution by typing : flutter doctor --android-licenses but i get another error:
And yes i have set the PATH variable and i have installed Android SDK Tools.
I tried everything but nothing seems to do the job.
Any help would be appreciated.
if you are using windows OS, backup your data, reinstall windows..remember to choose option to keep your files and application..after finish..check updates and update windows..
then run flutter doctor --android-licenses
I have updated my Android Studio, I am facing issue with flutter while creating new flutter project. I have set Environment Variable path as well as checked in cmd everything seems fine, but still it is giving error about Flutter SDK not found. Can any one suggest better solution for this issue ?
First, run flutter doctor, it should tell something, and if it doesn't, issue will probably be with gradle, updating gradle causes a lot of problem, i suggest you delete your gradle located at C:\Users***.gradle, or even the sdk and open android folder of a flutter app in android studio, and let the correct settings install, sync and setup..
When i try to implement scoped model, i get this error message:
[flutter_course] flutter packages get
Running "flutter packages get" in flutter_course...
Creation of temporary directory failed, path = 'C:\Program Files\flutter.pub-cache_temp\dir' (OS Error: Access is denied.
, errno = 5)
name: flutter_course
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
scoped_model: ^1.0.1
dev_dependencies:
flutter_test:
sdk: flutter
What worked for me is: flutter pub cache repair
reference
I FINALLY GOT THE SOLUTION
Hello guys I finally found a solution to this error.
So the problem is first caused because temporary files could not be created in the /bin or .pub-Cache
To fix this go to their respective folders which are in the flutter folder and the first start with the bin folder and change its security options to allow for ALL APPLICATION PACKAGES and then the .pub-Cache the same .
Run flutter doctor and if you get a license error just follow the steps given by flutter doctor and you are good to go.
Try to clean Flutter: flutter clean and then update pub with: flutter packages upgrade or update Flutter with: flutter upgrade.
This happens to be an active issue and the flutter team is currently working on it. The problem is specific to the Windows operating system. You can try the following workarounds for now:
1) Make sure your installation does not reside in any directory which requires special privileges like Program Files. If that's the case, you can try running it as admin for now but you should change your installation directory to a user's data directory as soon as possible (#Günter Zöchbauer has already pointed this out in the comments).
2) Try restarting your machine.
3) Try deleting the .dart_tools folder and also try clearing the cache in flutter/bin/cache
4) Try disabling your antivirus and/or windows defender temporarily (although it's not really possible for people working on corporate machines). This issue could have been caused by an active antivirus locking your files temporarily.
Enable in your windows settings the Developer Mode.
An easy solution that worked for me on Windows was to run Android Studio as administrator.
After that, the error no longer appeared.
If you have tried all answers here.
You should try this, it worked for me.
(in android studio) Delete the pubspec.lock file in your project.
(in android studio) Execute this-- Tools > Flutter > Flutter clean
Go to flutter sdk folder where you have downloaded it. In my case C:\src\flutter\
Run this below command.
C:\src\flutter\bin\cache\dart-sdk\bin>flutter pub cache repair
After completion run pub get again in your android studio. It should work.
Turning on developer mode solved my issue on Windows 10.
Delete temp folder in pub cache.
Do pub repair flutter pub cache repair.
Turn on developer mode in windows settings.
Flutter clean and delete pub.lock if exist.
Try flutter pub get.
This worked for me.
Because I switched the Flutter version, the following operation worked for me
flutter clean
flutter pub get
Update the Flutter sdk using : flutter upgrade.
And also scoped_model in this link scoped model is showing dart 2 incompatible
You get this error because "packages get" command attemp to delete file in ...flutter.pub-cache_temp. Delete files manually in this loction, this is may not perfect solutions but it's works.
Sometimes newly installed packages could cause this. Uninstall and install package again
I downloaded flutter sdk and extracted file in C:\FlutterDev\ and then start android studio
remember to provide flutter sdk path if you changed
I had a similar situation when I upgraded the flutter version to the new 2.2.
As a solution, I ran the command line as administrator (or terminal for linux users) in the Project folder and run the following commands:
flutter pub cache repair
2.flutter pub get
I have tried all the solutions mentioned above none worked for me.
Then I went to file(any .dart) which has dependency error then click on get dependency. it works for me.
I have tried
Flutter clean X
Flutter pub cache repair X
Add Security X
Delete Temp X
last ....
I just open the windows setting developer mode O
My solution was to run
flutter pub get
it in an external terminal not from android studio
Also I set windows as developer, I ran in terminal and turned developer mode on
start ms-settings:developers
not sure which one helped.
try this, it solved my error,
terminal->flutter clean, then flutter pub get after this you will get the reason for error ,
in my case i was using latest version of path dependencies(path ^1.8.3) but sdk depended on path ^1.8.2,
so i changed path dependency from path ^1.8.3 to path ^1.8.2, in pubspec.yaml and error solved...
In my case it was anti-virus, I turned it off for a few minutes it started working.
Flutter doctor is showing me Errors in these categories. Although I have Flutter Dart plugins installed. I have also failed to understand the other problem. I am using Android Studio 3.2 and I need Help to fix this issue.
As #bayardcodeboy said
You just run flutter doctor -v
It will show a description of how to fix the problem.
For my problem, I run the command
flutter doctor -v
flutter config --android-studio-dir=F:\android_studio
Because I install it in drive F on my computer.
Hope this will help.