新睿云

> 知识库 > flutter run命令报错:: ERROR:无法连接到锁定状态,错误代码-17解决办法

flutter run命令报错:: ERROR:无法连接到锁定状态,错误代码-17解决办法

作者/来源:新睿云小编 发布时间:2020-02-28

一、报错信息:

ERROR: Could not connect to lockdownd, error code -17

找不到模拟器或真机设备。这个问题应该是flutter SDK更新后引起的。

解决方法:修改lockdown文件夹的读写权限

读写权限

读写权限

1点击屏幕空白位置

或者finder(访达)>前往>前往文件夹>输入/var/db/找到的lockdown文件>快捷显示简介>点击底部共享与权限>点击右下角的锁输入密码解锁>点击共享与权限下面的加号,将自己的帐户添加到权限列表中,修改为读与写>最后锁定权限即可。

2接下来依次在终端执行下方命令

brew update

brew uninstall --ignore-dependencies libimobiledevice

brew uninstall --ignore-dependencies usbmuxd

brew install --HEAD usbmuxd

brew unlink usbmuxd

brew link usbmuxd

brew install --HEAD libimobiledevice

brew install ideviceinstaller

执行brew install --HEAD libimobiledevice命令报错:

Error: An exception occurred within a child process:

  DownloadError: Failed to download resource "libimobiledevice"

Failure while executing; `git clone --branch master https://git.libimobiledevice.org/libimobiledevice.git /Users/huanghaipo/Library/Caches/Homebrew/libimobiledevice--git` exited with 128. Here's the output:

Cloning into '/Users/huanghaipo/Library/Caches/Homebrew/libimobiledevice--git'...

fatal: unable to access 'https://git.libimobiledevice.org/libimobiledevice.git/': Failed to connect to git.libimobiledevice.org port 443: Operation timed out

解决方法:

科学上网软件,但是还是报错。但是第三次去执行brew install --HEAD libimobiledevice命令成功了。当时科学上网软件在打开着,很有可能是网速的问题。或者说多执行一次这个命令

Error: An exception occurred within a child process:

  DownloadError: Failed to download resource "libimobiledevice"

Failure while executing; `git clone --branch master https://git.libimobiledevice.org/libimobiledevice.git /Users/huanghaipo/Library/Caches/Homebrew/libimobiledevice--git` exited with 128. Here's the output:

Cloning into '/Users/huanghaipo/Library/Caches/Homebrew/libimobiledevice--git'...

error: RPC failed; curl 18 transfer closed with outstanding read data remaining

fatal: the remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

最后执行flutter doctor命令检测,成功找到设备。

热门标签
new year
在线咨询
咨询热线 400-1515-720
投诉与建议
{{item.description}}

—您的烦恼我们已经收到—

我们会将处理结果发送至您的手机

请耐心等待