Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftPM安装报错 #8

Closed
erduoniba opened this issue Sep 30, 2022 · 7 comments
Closed

SwiftPM安装报错 #8

erduoniba opened this issue Sep 30, 2022 · 7 comments

Comments

@erduoniba
Copy link

Dependencies could not be resolved because 'V2exAPI' contains incompatible tools version (5.6.0) and root depends on 'V2exAPI' 1.0.0..<2.0.0.

Xcode13.2

@isaced
Copy link
Owner

isaced commented Sep 30, 2022

$ xcodebuild -resolvePackageDependencies
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph

Resolved source packages:
  Kingfisher: https://github.com/onevcat/Kingfisher @ 7.3.2
  combine-schedulers: https://github.com/pointfreeco/combine-schedulers @ 0.8.0
  MarkdownUI: https://github.com/gonzalezreal/MarkdownUI @ 1.1.1
  KeychainAccess: https://github.com/kishikawakatsumi/KeychainAccess @ master
  V2exAPI: https://github.com/isaced/V2exAPI.git @ 1.0.2
  NetworkImage: https://github.com/gonzalezreal/NetworkImage @ 4.0.1
  AttributedText: https://github.com/gonzalezreal/AttributedText @ 1.0.0
  SwiftCommonMark: https://github.com/gonzalezreal/SwiftCommonMark @ 1.0.0
  xctest-dynamic-overlay: https://github.com/pointfreeco/xctest-dynamic-overlay @ 0.4.1

resolved source packages: Kingfisher, combine-schedulers, MarkdownUI, KeychainAccess, V2exAPI, NetworkImage, AttributedText, SwiftCommonMark, xctest-dynamic-overlay

这是我执行 xcodebuild -resolvePackageDependencies 的输出结果,可以试试 Pull 最新代码,然后清理一下 SPM 缓存 Packages -> Reset Package Cache

@erduoniba
Copy link
Author

@erduoniba
Copy link
Author

erduoniba commented Sep 30, 2022

我这边执行
$ xcodebuild -resolvePackageDependencies

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph

Updating from https://github.com/kishikawakatsumi/KeychainAccess

Updating from https://github.com/onevcat/Kingfisher

Updating from https://github.com/isaced/V2exAPI.git

Updating from https://github.com/gonzalezreal/MarkdownUI

xcodebuild: error: Could not resolve package dependencies:
Dependencies could not be resolved because 'V2exAPI' contains incompatible tools version (5.6.0) and root depends on 'V2exAPI' 1.0.2..<2.0.0.

代码有pull最新的,也清理一下 SPM 缓存 Packages -> Reset Package Cache

@erduoniba erduoniba reopened this Sep 30, 2022
@erduoniba
Copy link
Author

erduoniba commented Sep 30, 2022

@isaced
https://onevcat.com/2020/09/swift-package-version/
是不是需要你那在Package.swift兼容 5.5.0 呢

@isaced
Copy link
Owner

isaced commented Sep 30, 2022

https://github.com/isaced/V2exAPI/blob/ecf06e3c479d87553aa14deed62b3469eb80b5ca/Package.swift#L1

// swift-tools-version: 5.6 
...

V2exAPIswift-tools-version 是 5.6 🤔

@erduoniba
Copy link
Author

erduoniba commented Sep 30, 2022

那就是这个原因导致的了,我的是Xcode13.2,swift-tools-version 是5.5,所以有冲突;
刚刚试了下Xcode14.0版本,可以正常安装运行了。

@isaced
Copy link
Owner

isaced commented Sep 30, 2022

好的,太棒了 🎉

@isaced isaced closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants