gpt4 book ai didi

swift - 您的规范源都不包含满足依赖关系的规范

转载 作者:行者123 更新时间:2023-11-30 11:13:25 25 4
gpt4 key购买 nike

我在我自己的 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 ?我说得对吗?

最佳答案

回答问题。我大概知道错误出在哪里了。在我的 podspec 中,我使用 spec.dependency 'MatomoTracker', '~> 5.2'

没有上面这行,验证通过看来需要更高的最低部署目标。我已将所有地方的部署目标更新为 11.0。- Podfile- Xcode 中的build设置(pod 目标)- 规范 ios 目标也在 pod 规范中

这是我得到的错误

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未通过验证

关于swift - 您的规范源都不包含满足依赖关系的规范,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51964515/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com