【问题标题】:pod install error: The name of the given podspec 'file_picker' doesn't match the expected one 'gx_file_picker'pod install 错误:给定 podspec 'file_picker' 的名称与预期的 'gx_file_picker' 不匹配
【发布时间】:2021-07-08 07:24:48
【问题描述】:

我在安装 pod 时遇到以下错误。

[!] The name of the given podspec 'file_picker' doesn't match the expected one 'gx_file_picker'

我尝试将“pubspec.yaml”中的文件名从 gx_file_picker 更改为 file_picker,但这似乎不起作用。进一步的研究也没有成效。

知道如何解决这个问题吗?

【问题讨论】:

    标签: flutter dart flutter-dependencies flutter-packages pod-install


    【解决方案1】:

    我也遇到了同样的问题,我发现gx_file_picker/ios/gx_filepicker.podspec:

      s.name             = 'file_picker'
    

    必须改为:

      s.name             = 'gx_file_picker'
    

    更改后这样做不会造成任何伤害:

    1. 进入ios文件夹
    2. 删除 PodFile.lock 文件
    3. rm -rf Pods
    4. pod 缓存清理 --all
    5. 吊舱解体
    6. 吊舱设置
    7. 吊舱安装

    现在我的项目中一切正常。

    【讨论】:

    • 运行 pod install 后文件返回到 file_picker 然后发生同样的错误
    • 那就再改吧。
    • 我这样做了很多次,但还是一样。
    • 只是帮帮忙,找到这个目录“gx_file_picker/ios/gx_filepicker.podspec:”在finder中导航到您安装的Flutter SDK文件夹,确保您可以查看隐藏文件夹并导航到“flutter /.pub-cache/hosted/pub.dartlang.org/" 你会在那里找到目录。
    • @birukIS 您是否遵循了下面列出的其他步骤,包括清除 pod 缓存。我认为这就是问题所在。
    猜你喜欢
    • 2020-08-01
    • 2020-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-14
    • 1970-01-01
    • 2020-11-11
    相关资源
    最近更新 更多