【发布时间】:2020-06-11 05:56:33
【问题描述】:
我正在尝试使用 image_picker_web 包,(https://pub.dev/packages/image_picker_web) 并放了:
image_picker_web: ^1.0.9
在我的 pubspec.yaml 文件中。
当我尝试为 iOS 构建项目时,我收到以下错误:
[ios/.symlinks/plugins/image_picker_web/example] flutter pub get
Running "flutter pub get" in example...
Cannot open file, path = '/Users/username/.pub-cache/global_packages/image_picker_web_example/pubspec.lock' (OS Error: No such file or directory, errno = 2)
pub get failed (66; Cannot open file, path = '/Users/username/.pub-cache/global_packages/image_picker_web_example/pubspec.lock' (OS Error: No such file or directory, errno = 2))
exit code 66
由于项目中没有使用该包的其他代码,我得到了同样的错误。避免它的唯一方法是在我的 pubspec.yaml 中注释掉 image_picker_web: ^1.0.9 并运行 'flutter pub get'
我在他们的 git repo 中创建了一个问题,假设这是一个错误。是这样吗?有什么解决方法吗? (也许在为不同平台构建时忽略了一个包?)
【问题讨论】:
-
flutter clean有帮助吗? -
显然它试图在
example包上使用get,这可能是他们的一个错误。 -
flutter clean 没有帮助。这可能是他们的一个错误。如果您注册该软件包并尝试为 ios 构建,你们看到同样的事情吗?
-
另外,我运行了flutter build ios并得到:->从
.symlinks/plugins/image_picker_web/ios获取image_picker_web的podspec [!]在.symlinks/plugins/image_picker_web/ios中找不到image_picker_web的podspec -
很抱歉,我没有 Mac OS 来测试它。
标签: flutter