繁体   English   中英

Pod install 不会安装 Pod

[英]Pod install won't install the pods

运行 pod install 时遇到问题。

这是我的 pod 文件的样子:

platform :ios, '8.0'

target 'Template1' do


pod "PinterestSDK", :git => "https://github.com/pinterest/ios-pdk.git"

end

但是它不会安装 pod,一旦我执行pod install ,这就是它给出的输出。

Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `Template1.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 0 dependencies from the Podfile and 0 total
pods installed.

[!] The Podfile does not contain any dependencies.

我不确定出了什么问题。

  1. 从项目目录中删除“Pods”目录(如果存在)

  2. 在终端中, $open -a xcode Podfile

  3. 使用这个:(Podfile)

    平台:ios,'8.0'

    目标 'Template1' 做

    pod“PinterestSDK”

    结束

  4. 在终端中, $ cd YOUR_PROJECT_PATH

  5. 吊舱安装

运行命令 pod install 后,您将收到一条显示在给定图像中的消息。 之后只需删除 Podfile 并运行您的项目,它会自动创建另一个 Podfile 并生成包含在 pub spec.yaml 中的依赖项 在此处输入图像描述

If you are using React Native, make sure to add this on top of your pod file.

require_relative '../node_modules/react-native/scripts/react_native_pods' 

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' platform :ios, '10.0'

对我来说,当我在 macOS 上运行flutter应用程序时发生了这个错误。

我删除macos/podfilemacos/podfile.lock文件并重新运行flutter run ,这解决了问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM