首页 > 解决方案 > CocoaPods 找不到 pod“MatrixSDK”的兼容版本

问题描述

我正在尝试从 xcode 构建应用程序。
我从 git repo 克隆了项目。
我打开 .xcodeproj 文件并从 Product > Build 我尝试构建但构建失败。
从终端我执行以下命令并收到兼容版本错误

我搜索了解决方案并尝试了几种方法,例如:

sudo gem intall cocoapods
sudo gem intall cocoapods --pre
pod setup
pod deintegrate
pod install
pod update
pod install --repo-update

下面是终端输出:

Analyzing dependencies
Pre-downloading: `BarcodeScanner` from `https://github.com/htothee/BarcodeScanner.git`
Pre-downloading: `MatrixKit` from `https://github.com/N-Pex/matrix-ios-kit.git`, branch `fix_apns_push`
Pre-downloading: `MatrixSDK` from `https://github.com/matrix-org/matrix-ios-sdk.git`, branch `develop`
Pre-downloading: `QRCode` from `https://github.com/brackendev/QRCode.git`
[!] CocoaPods could not find compatible versions for pod "MatrixSDK":
  In Podfile:
    MatrixKit (from `https://github.com/N-Pex/matrix-ios-kit.git`, branch `fix_apns_push`) was resolved to 0.10.1, which depends on
      MatrixSDK (= 0.13.0)

    MatrixSDK (from `https://github.com/matrix-org/matrix-ios-sdk.git`, branch `develop`)

下面是 Podfile

platform :ios, '9.3'
use_frameworks!

def shared_pods
    pod 'ProjectCore', :path => '../'
    pod 'MatrixKit', :git => 'https://github.com/N-Pex/matrix-ios-kit.git', :branch => 'fix_apns_push'
    pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
end

target 'Project_Example' do
  shared_pods

  pod 'BarcodeScanner', :git => 'https://github.com/htothee/BarcodeScanner.git'
  pod 'QRCode', :git => 'https://github.com/brackendev/QRCode.git'

  pod 'Project', :path => '../'

  target 'Project_Tests' do
    inherit! :search_paths
  end
end

target 'ShareExtension' do
  shared_pods

  pod 'ProjectExtension', :path => '../'
end

预期:
需要创建 .ipa 文件

请让我知道我该如何解决。

标签: xcodegitcocoapodsipaappium-ios

解决方案


对我来说同样的问题 CocoaPods 找不到 pod "Branch" 的兼容版本

删除 Podfile.lock 和 Pods 然后做 pod install

rm -rf ./Pods Podfile.lock

吊舱安装--repo-update

试试这个,这对我有用。谢谢。


推荐阅读