Flutter ios No podspec found for `flutter_keyboard_visibility_web` in

kpbpu008  于 12个月前  发布在  iOS
关注(0)|答案(3)|浏览(157)

我在Mac -> Android Studio中使用Flutter,当我在终端中编写Pod安装时。它告诉我

Analyzing dependencies
[!] No podspec found for `flutter_keyboard_visibility_web` in .symlinks/plugins/flutter_keyboard_visibility_web/ios`

我从一年前开始使用Flutter,这是我第一次遇到这种情况。我不能运行app。我没有一个插件与此名称flutter_keyboard_visibility_web在pubspec
怎么修,谢谢

aor9mmx1

aor9mmx11#

解决方案是:
1-从ios文件夹中删除Podfile和Podfile.lock
2-从终端或Android Studio ->工具-> Flutter -> Flutter Clean进行Flutter清理
3-Pod安装
4-运行app
解决方案如下:https://github.com/MisterJimson/flutter_keyboard_visibility/issues/52

yks3o0rb

yks3o0rb2#

我有同样的问题,但我清除了IntelliJ上的缓存,它又开始工作了。
要在IntelliJ上执行此操作:
1.从主菜单中选择文件|无效缓存/重新启动。
1.在Invalidate Caches对话框中,选择invalidate the caches and restart the IDE

mzsu5hc0

mzsu5hc03#

我知道这很古老。但我今天得到了同样的错误为应用程序本身。这是在我将我的项目更新到最新的Flutter版本3.13.6后发生的。可能是扑翼虫。
错误代码:

[!] No podspec found for `MY_APP` in `.symlinks/plugins/tournament_viewer_flutter/ios

所以经过一个小时的失败,最后我决定在ios文件夹下制作一个虚拟的podspec文件。
我将ios/Flutter/Flutter.podspec文件复制到ios/MY_APP.podspec,并按如下所示更改内容(您可以将值更改为您的值。这只是一个参考)。

Pod::Spec.new do |s|
  s.name             = 'MY_APP'
  s.version          = '1.0.0'
  s.summary          = 'MY APP'
  s.homepage         = 'site link with https'
  s.license          = { :type => 'BSD' }
  s.author           = { 'MY TEAM' => '[email protected]' }
  s.source           = { :git => '', :version => s.version.to_s }
  s.ios.deployment_target = '11.0'
  # Framework linking is handled by Flutter tooling, not CocoaPods.
  # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
  s.vendored_frameworks = 'path/to/nothing'
end

相关问题