shared_preference 2.0.6 version - flutter

I can't dowload shared_preference. please help
enter image description here
here there is no shared preferenece. I clicked pub get and my internet connection is also good

I have found answer to my problem
Just I had written $ flutter pub cache repair
to terminal

Related

How to solve the error on outdated code when cloning

I am recently want to see and run some other developers code in github and clone it to run in my emulator but it showing some error like this
"Running "flutter pub get" in budgex...
Because budgex depends on basic_utils from path which doesn't exist (could not find package basic_utils at "..\packages\basic-utils-3.3.3"), version solving failed.
pub get failed (66; Because budgex depends on basic_utils from path which doesn't exist (could not find package basic_utils at "..\packages\basic-utils-3.3.3"), version solving failed.)"
i am was trying to install basic_utils package but seem failed how to solve this problem?
Click on the link to get packages in the given environment like VS code, or save your code while pubspec.yaml file is opened – it will get flutter packages for you automatically.
The error says that you are trying to use a library on your local computer: basic_utils; the pub command is searching it in the path ..\packages\basic-utils-3.3.3 but it can't find the library there.
In the pubspec.yaml you should have something like this:
basic_utils:
path: ..\packages\basic-utils-3.3.3
You should be ok replacing this with:
basic_utils: 3.3.3
If the developer has made changes to the library you should ask him the changed library and then update the pubspec with the correct location like described here.

Android Studio Flutter lib/widgets/builder/video/video.dart:4:8: Error: Not found:

I've been struggling for days and couldn't solve this problem I need your help. I bought a package and tried all the commands I wanted to run first. "flutter pub get, flutter upgrade, etc.." but the error is still not resolved, please help.
enter image description here
enter image description here

"flutter pub get" A required privilege is not held by the client

I keep getting this error on Android Studio flutter project, although flutter doctor command shows no issues!
Cannot create link, path = 'C:\Users\UserName\AppData\Local\Pub\Cache\_temp\dir90f89940\ios\Classes\FLTFirebaseAuthPlugin.m'
(OS Error: A required privilege is not held by the client.
, errno = 1314)
pub get failed (66; , errno = 1314))
I tried with pub upgrade which seams to get dependencies correctly and start updating them, but I didn't know why pub get give this error.
Update
A workaround seems to be running Android Studio as administrator!
I have switched ON developer mode in Windows settings (Settings -> Update & security -> For developers) . It worked for me.
Like so:
I'm using vscode I just opened it as administrator and everything works fine.
If you are using Android Studio:
open Android Studio with "Run as administrator"
Just run your PowerShell in administrator mode
the
cd to your project and run
flutter pub get
I wanted to add this solution because when you have accounts managed by your company this is a common problem.
Just go to your quick acces in Start then:
Right Click > More > Open File Location
When the Explorer Opens Right Click again on the AS Icon (quick access), then:
Properties > Advanced ... > Run as Administrator
So you can run always by default as Administrator.
Regards.-
Just run your IDE whether VS Code or Android Studio as Administrator . It solves the issue
Other temporary solution is that making pub cache and then trying flutter pub get.
https://spikez.tistory.com/439
Solution :
1.  flutter pub get
 
 ==> error will be occurred.
[your flutter sdk folder]\flutter.pub-cache_temp\ dir7d36fb45\macos\Classes\FlutterBluePlugin.h' (OS Error: 지정된 파일을 찾을 수 없습니다. , errno = 2)
copy dir7d36fb45  to [your flutter sdk folder]\flutter.pub-cache\hosted\pub.dartlang.org 
change name dir7d36fb45 to flutter_blue-0.8.0
cd flutter_blue-0.8.0 (created by you)
create pubspec.yaml in flutter_blue-0.8.0 folder
fill below content in pubspec.yaml
now you have done preparing flutter_blue cache  :)
lets do, flutter pub get
maybe it will be work.
I know it is a temporary solution. but I believe it will help you understand how to work pub get..
 
If you need new pubspec.yaml ,
you can find out in here  : https://github.com/pauldemarco/flutter_blue/blob/master/pubspec.yaml

Could not find an option named "devtools-server-address". when trying to run flutter app from AndroidStudio

I just updated Flutter plugin to 53.0.1, restarted Android Studio and hit "run" button and the error below show up:
Could not find an option named "devtools-server-address".
Close and reopen AndroidStudio resolved for me!
killall java
I downgraded from Flutter 2.0 to Flutter 1.22.5 and got this error.
To solve it,
Go to your terminal and write flutter channel stable.
Then run flutter doctor.
Now you may get another error like this -
If you have Flutter & Dart plugins already install, just ignore this error. This is a bug in Flutter 1.22.5 .
Just run the app and it will work fine!
I had the same issue but using VS Code on stable channel
Execute the following commands:
flutter channel stable
flutter upgrade
flutter clean
flutter pub get
Then, close and open your IDE
Follow the steps:
File -> Invalidate Cache and Restart. Run flutter clean Worked For me.
This so simple... Open terminal type flutter channel dev this solve your problem.
And after that flutter upgrade
Finally, flutter doctor
If it does not help:
Open terminal type flutter channel stable
And after that flutter upgrade
Finally, flutter doctor
Working without upgrading flutter
Safe fix for Mac (Android Studio 4.1+). It is in a different directory now, but the symbolic link helps.
Just run this command in the Terminal:
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Change the version of the Android studio depending on what you have, I had 4.2 so used.
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.2/plugins ~/Library/Application\ Support/AndroidStudio4.2
Just Invalidate Cache and Restart. Worked for me.
Just close your all project and also close Android Studio and Reopen.

Can't get or upgrade dependencies for Flutter in Android Studio

I'm very new to developing so I'm sorry if this is a silly question. When trying to open a Flutter package from Git I am not able to 'get dependencies' or 'upgrade dependencies'
I get the message:
C:\Flutter\flutter\bin\flutter.bat --no-color pub get
This is the folder that I installed Flutter in on my computer. I have read other threads here and tried to following with no luck:
- Uninstalled and reinstalled Flutter
- Checked the Flutter SDK setup in 'Languages & Frameworks'
- Tried Flutter Clean
- Check for updates for Flutter
As I said I'm pretty new so may be making a simple mistake. If anyone has any ideas it would be greatly appreciated.
Have you tried running this from your terminal in your project
flutter packages get
please check indentation in pubspec.yaml file while you are writing any package name