我无法导入我需要的东西,以使用 MaterialContainerScheme

I cannot import what I need to, to use MaterialContainerScheme

我想切换到使用 beta podspec,并根据文档更新我的 Podfile,但收到错误消息“无法找到 MaterialComponentsbeta` 的规范。

复制步骤

重现该行为的步骤:

  1. 已将 Podfile 更新为 pod 'MaterialComponentsBeta', :git => 'https://github.com/material-components/material-components-ios', :branch => 'develop'
  2. 运行 pod install.
  3. 收到错误。

预期行为

安装适当的 pod 库

实际行为

收到以下错误:

Analyzing dependencies
Pre-downloading: `AlertOnboarding` from `https://github.com/doronkatz/AlertOnboarding.git`, branch `master`
Pre-downloading: `MaterialComponentsBeta` from `https://github.com/material-components/material-components-ios`, branch `develop`
[!] Unable to find a specification for 'MaterialComponentsBeta'.

[!] Unable to load a podspec from `MaterialComponentsSnapshotTests.podspec`, skipping:

Pod::DSLError

[!] Unable to load a podspec from `MaterialComponents.podspec`, skipping:

Pod::DSLError

[!] Unable to load a podspec from `MaterialComponentsBeta.podspec`, skipping:

Pod::DSLError

平台(请填写以下信息)

我认为你用错了url,你应该尝试按照以下方法来解决你的问题。

pod 'MaterialComponentsBeta', :git => 'https://github.com/material-components/material-components-ios.git'

查看此文档Material Design Beta Components