【问题标题】:None of your spec sources contain a spec satisfying the dependency您的规范源都不包含满足依赖项的规范
【发布时间】:2018-08-22 10:08:23
【问题描述】:

我在自己的 pod 中引用了 pod 'MatomoTracker' linting 时出现此错误:pod lint spec

 -> TrackerPod.v3 (0.0.1)
    - ERROR | [iOS] unknown: Encountered an unknown error (CocoaPods could not find compatible versions for pod "Pods/MatomoTracker/MatomoTracker":
  In Podfile:
    TrackerPod.v3 (from `/Users/****/Documents/projects/ios/libs/TrackerPod.v3/TrackerPod.v3.podspec`) was resolved to 0.0.1, which depends on
      TrackerPod.v3/Matomo (= 0.0.1) was resolved to 0.0.1, which depends on
        Pods/MatomoTracker/MatomoTracker (= 5.2.0)

None of your spec sources contain a spec satisfying the dependency: `Pods/MatomoTracker/MatomoTracker (= 5.2.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

这是我的 podspec

Pod::Spec.new do |spec|

  spec.name         = 'TrackerPod.v3'
  spec.version      = '0.0.1'
  spec.license      = 'Copyright ****'
  spec.homepage     = 'https://*******8/TrackerPod/blob/master/README.md'
  spec.author       = { '****' => '****@****.com' }
  spec.summary      = 'Some description'
  spec.source       = { :git => '****', :tag => spec.version.to_s }
  spec.source_files  = 'TrackerPod.v3/*.{h,m, swift}'
  spec.ios.deployment_target = '8.0'
  spec.osx.deployment_target = '10.10'
  spec.requires_arc = true
  spec.swift_version = '4.0'
  spec.xcconfig = { 'SWIFT_VERSION' => '4.1' }
  spec.dependency 'MatomoTracker', '5.2.0'
  spec.subspec 'Matomo' do |lib|
    lib.dependency 'Pods/MatomoTracker/MatomoTracker', '5.2.0'
    lib.source_files = 'Pods/MatomoTracker/MatomoTracker/**/*.{h,m,swift}'
  end
end

而且,这是屏幕截图,用于显示我的项目导航器。 您可以看到 MatomoTracker 在 'Pods' 内嵌套了 2 层

the project navigator

我正在使用正确的路径引用 MatomoTracker Pods/MatomoTracker/MatomoTracker,它似乎没有找到 Pod Matomoto ? 我说的对吗?

【问题讨论】:

  • lib.dependency 'Pods/MatomoTracker/MatomoTracker', '5.2.0' => lib.dependency 'MatomoTracker', '5.2.0'?无需指定其路径。
  • 我发布了一个答案。虽然仍然在黑暗中

标签: swift cocoapods podspec


【解决方案1】:

回答问题。我有点知道错误在哪里。 在我的 podspec 中,我使用的是 spec.dependency 'MatomoTracker', '~> 5.2'

没有上述行,验证通过 似乎需要更高的最低部署目标。我在各处都将部署目标更新为 11.0。 - 播客文件 - 在 Xcode 中构建设置(pod 目标) - 在 pod 规范中规范 ios 目标

而且,这是我得到的错误

ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.

ERROR | [OSX] unknown: Encountered an unknown error (CocoaPods could not find compatible versions for pod "MatomoTracker":
  In Podfile:
    TrackerPod.v3 (from `/Users/*****/Documents/projects/ios/libs/TrackerPod.v3`) was resolved to 0.0.1, which depends on
      MatomoTracker (~> 5.2)

Specs satisfying the `MatomoTracker (~> 5.2)` dependency were found, but they required a higher minimum deployment target.) during validation.

虽然我觉得我按照书上的规定和cocoapods guide 做的那样,但我仍然错过了一些东西。 MatomoTracker 未通过验证

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-23
    • 2013-05-30
    • 2022-06-14
    • 2019-11-01
    • 2012-08-15
    • 1970-01-01
    相关资源
    最近更新 更多