반응형

Windows 환경에서 flutter_blue 를 설치하려다 다음과 같은 에러가 발생했습니다.

 


\macos\Classes\FlutterBluePlugin.h' (OS Error: The client does not have the required privileges.

 

이 문제는 flutter_blue 가 설치 될때 , symbolic link ( soft link) 로 되어있는 파일을 접근 하려다 발생되는 에러 입니다.

linux , macos 의 경우에는 symbolic link가 실제 file처럼 접근이 가능하지만, windows에서는 단순 숏컷으로 동장하기 때문에 문제가 발생한것으로 보이는데요.

해결하기 위해서는 flutter_blue 배포자가 수정을 해줘야 하겠지만,우리는 임시로 해결법을 찾아야 합니다.


아래 과정을 통해서 임시로 해결할 수 있습니다.

 

 

Solution 2: It is working well. (I'm using this solution)

 

1. flutter_blue의 git 을 clone 또는 download 합니다. (https://github.com/pauldemarco/flutter_blue)

2. 다운받은 flutter_blue 을 [설치된 flutter sdk folder]\flutter\.pub-cache\hosted 폴더로 복사합니다.

3. 이름을 변경합니다.  flutter_blue -> flutter_blue-0.8.0

 

이렇게 해서 pub get을 다시 해보시면 잘 동작 할것입니다.

.pub_cache\hosted 가 cache 폴더로 plugin들을 설치할떄 여기에 cache를 남겨두기 떄문에 여기에 정상적으로 업데이트 해놓으면 pub get 동작이 정상적으로 동작합니다.

 

 

반응형

\macos\Classes\FlutterBluePlugin.h' (OS Error: The client does not have the required privileges.



Problem: flutter_blue has installation problem in windows.

 

 

Solution 2: It is working well. (I'm using this solution)

 

1. download flutter_blue from git (https://github.com/pauldemarco/flutter_blue)

2. move flutter_blue to [your flutter sdk folder]\flutter\.pub-cache\hosted folder.

3. change name flutter_blue -> flutter_blue-0.8.0

4. done

 

 

 

 


Solution 1: it's just first found out solution. unfortunately it just can avoid ONLY get pub error.(FAILED)
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)

2. copy dir7d36fb45 to [your flutter sdk folder]\flutter\.pub-cache\hosted\pub.dartlang.org
3. change name dir7d36fb45 to flutter_blue-0.8.0
4. cd flutter_blue-0.8.0 (created by you)
5. create pubspec.yaml in flutter_blue-0.8.0 folder
6. fill below content in pubspec.yaml

name: flutter_blue
description:
  Flutter plugin for connecting and communicating with Bluetooth Low Energy devices,
  on Android and iOS
version: 0.8.0
homepage: https://github.com/pauldemarco/flutter_blue

environment:
  sdk: '>=2.12.0 <3.0.0'
  flutter: ">=1.12.13+hotfix.6"

dependencies:
  flutter:
    sdk: flutter
  convert: ^3.0.0
  protobuf: ^2.0.0
  rxdart: ^0.26.0
  collection: ^1.15.0
  meta: ^1.3.0

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  plugin:
    platforms:
      android:
        package: com.pauldemarco.flutter_blue
        pluginClass: FlutterBluePlugin
      ios:
        pluginClass: FlutterBluePlugin
      macos:
        pluginClass: FlutterBluePlugin

7. now you have done preparing flutter_blue  cache :)
8. lets do  flutter pub get   !!
maybe it will be worked.
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

+ Recent posts