【问题标题】:FLUTTER [!] No podspec found for `helloworld` in `Pods/.symlinks/plugins/helloworld/ios`颤振 [!] 在 `Pods/.symlinks/plugins/helloworld/ios` 中找不到 `helloworld` 的 podspec
【发布时间】:2018-05-17 06:13:15
【问题描述】:

我已经使用颤振有一段时间了。有一次,当我去编译时,我遇到了这个错误。我的代码似乎没有任何意义。我试图重新安装我的 cocoapods,但这并没有改变任何东西。有人有什么想法吗?

  Launching lib/main.dart on iPhone X in debug mode...
Skipping compilation. Fingerprint match.
Running pod install...
CocoaPods' output:
↳
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (`arm64`)

Finding Podfile changes
  A helloworld
  - Flutter
  - camera

Fetching external sources
-> Fetching podspec for `Flutter` from `Pods/.symlinks/flutter/ios`
-> Fetching podspec for `camera` from `Pods/.symlinks/plugins/camera-0.1.2/ios`
-> Fetching podspec for `helloworld ` from `Pods/.symlinks/plugins/helloworld/ios`
[!] No podspec found for `helloworld ` in `Pods/.symlinks/plugins/helloworld/ios`

/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:85:in `titled_section'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:685:in `fetch_external_source'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:661:in `block (2 levels) in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:660:in `each'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:660:in `block in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:659:in `fetch_external_sources'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:82:in `analyze'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:243:in `analyze'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:116:in `install!'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/command/install.rb:41:in `run'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.4.0/libexec/gems/cocoapods-1.4.0/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.4.0/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.4.0/libexec/bin/pod:22:in `<main>'
Error running pod install
Error launching application on iPhone X.

【问题讨论】:

    标签: dart cocoapods flutter


    【解决方案1】:

    这个问题发生在我身上,因为我不得不重命名我正在开发的插件。在我开始开发插件之后,但在我能够上传之前,包名称已被使用(例如,plugin_oldname)。

    我的解决方案是:

    修复.podspec名称:

      mv ios/plugin_oldname.podspec ios/plugin_newname.podspec
    

    修复podspec文件中s.name参数的值,并将plugin_oldname替换为plugin_newname

      Pod::Spec.new do |s|
        # Changed to plugin_newname from plugin_oldname
        s.name             = 'plugin_newname'
    

    【讨论】:

    • 谢谢,这解决了我一半的问题,而不是我在示例中使用的不同插件上遇到了同样的问题。我该如何解决? [!] 在 .symlinks/plugins/permission_handler/ios 中找不到 permission_handler 的 podspec,你所说的 s.name 是什么意思?
    • @EmreAkcan 我添加了一些关于 s.name 的说明。它在 podspec 文件中,打开它并编辑它的值
    • 不确定如何解决您的问题,请先尝试修复 s.name,然后再尝试清理缓存、构建文件等。除了这些之外,我不知道该怎么做帮助你
    【解决方案2】:

    原来我的 .yaml 文件中缺少一个依赖项。 现在一切正常 :) 我会把它留在这里,以防有人去寻找同样的错误

    【讨论】:

      猜你喜欢
      • 2019-05-24
      • 2021-05-19
      • 2020-09-03
      • 2019-12-04
      • 1970-01-01
      • 1970-01-01
      • 2011-08-03
      • 1970-01-01
      • 2022-12-10
      相关资源
      最近更新 更多