【问题标题】:issue with all >1.2 flutter version on macmac上所有> 1.2颤振版本的问题
【发布时间】:2021-01-22 16:38:42
【问题描述】:

17.5(最后一次在 1.2 之前),当我尝试升级到 1.2 或更高版本时,我有

Warning: Podfile is out of date
  This can cause issues if your application depends on plugins that do not support iOS.
  See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile

我试过rm ios/Podfile

rm: ios/Podfile: No such file or directory

我关注问题和解决方案,但不与我合作......或做错事

如果有人可以帮助我,谢谢

[编辑]:我删除了podfil,没关系,谢谢你的帮助

【问题讨论】:

标签: macos flutter


【解决方案1】:

在 finder 中查找项目文件的存储位置。或者在终端输入 find ~/ -type f -name "YOUR PROJECT NAME"。通过键入ls 列出您的文件并进入您的flutter 项目中的ios 文件,然后键入rm Podfile。这应该删除 podfile,一旦你再次运行项目,pod 将通过 Flutter 安装

【讨论】:

    【解决方案2】:

    最好的办法是重新生成 iOS 项目。 如果您对原生解决方案 (Xcode) 进行了任何更改,即新的视图控制器、资产或视频文件等,请务必先备份这些内容。

    然后从你的 Flutter 项目工作区中删除 iOS 项目,并运行以下命令:

    flutter create  -i swift .
    

    这将生成一个快速的解决方案,但如果您正在寻找objective-c,那么试试这个:

    flutter create  -i objc .
    

    iOS 项目重新创建后,您需要清理项目,然后确保 podfile 存在于您的项目目录中。

    然后运行:

    cd ios
    podfile install
    

    在 podfile 安装所有必需的依赖项后,尝试重新部署您的 iOS 项目:

    flutter run -d "Device Name" --release
    

    但是要确保你在根目录上运行flutter,所以:

    cd ..
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-08
      • 1970-01-01
      • 2023-03-16
      • 2021-02-01
      • 2021-10-21
      • 1970-01-01
      • 2020-10-13
      • 2021-11-16
      相关资源
      最近更新 更多