skip to Main Content

I keep getting this error on Android Studio flutter project, although flutter doctor command shows no issues!

    Cannot create link, path = 'C:UsersUserNameAppDataLocalPubCache_tempdir90f89940iosClassesFLTFirebaseAuthPlugin.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!

7

Answers


  1. Just run your PowerShell in administrator mode

    the

    cd to your project and run

    flutter pub get
    
    Login or Signup to reply.
  2. I have switched ON developer mode in Windows settings (Settings -> Update & security -> For developers) . It worked for me.

    Like so:

    enter image description here

    Login or Signup to reply.
  3. If you are using Android Studio:

    open Android Studio with "Run as administrator"

    Login or Signup to reply.
  4. 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.-

    Login or Signup to reply.
  5. I’m using vscode I just opened it as administrator and everything works fine.

    Login or Signup to reply.
  6. Just run your IDE whether VS Code or Android Studio as Administrator . It solves the issue

    Login or Signup to reply.
  7. 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 dir7d36fb45macosClassesFlutterBluePlugin.h’ (OS Error: 지정된 파일을 찾을 수 없습니다. , errno = 2)

    1. copy dir7d36fb45  to [your flutter sdk folder]flutter.pub-cachehostedpub.dartlang.org 
    2. change name dir7d36fb45 to flutter_blue-0.8.0
    3. cd flutter_blue-0.8.0 (created by you)
    4. create pubspec.yaml in flutter_blue-0.8.0 folder
    5. fill below content in pubspec.yaml
    6. now you have done preparing flutter_blue cache  🙂
    7. 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
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search