Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Xcode链接器错误和pod安装表明4个依赖项中只有3个依赖项_Ios_Xcode_Cocoapods - Fatal编程技术网

Ios Xcode链接器错误和pod安装表明4个依赖项中只有3个依赖项

Ios Xcode链接器错误和pod安装表明4个依赖项中只有3个依赖项,ios,xcode,cocoapods,Ios,Xcode,Cocoapods,在Xcode 10.1中,我在SwiftCharts周围遇到一个链接器错误。这是在我开始运行10.2之后,由于Xcode错误,需要恢复到10.1。我关闭了Xcode并用以下命令清理了POD: rm -rf ~/Library/Caches/CocoaPods rm -rf Pods rm -rf ~/Library/Developer/Xcode/DerivedData/* pod deintegrate pod setup pod install pod instal

在Xcode 10.1中,我在SwiftCharts周围遇到一个链接器错误。这是在我开始运行10.2之后,由于Xcode错误,需要恢复到10.1。我关闭了Xcode并用以下命令清理了POD:

  rm -rf ~/Library/Caches/CocoaPods
  rm -rf Pods
  rm -rf ~/Library/Developer/Xcode/DerivedData/*
  pod deintegrate
  pod setup
  pod install
pod install
Analyzing dependencies
Downloading dependencies
Installing Realm (3.14.1)
Installing RealmSwift (3.14.1)
Installing SwiftCharts (0.6.5)
Installing SwiftGraph (2.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.
这导致没有衍生数据。安装的输出如下所示:

  rm -rf ~/Library/Caches/CocoaPods
  rm -rf Pods
  rm -rf ~/Library/Developer/Xcode/DerivedData/*
  pod deintegrate
  pod setup
  pod install
pod install
Analyzing dependencies
Downloading dependencies
Installing Realm (3.14.1)
Installing RealmSwift (3.14.1)
Installing SwiftCharts (0.6.5)
Installing SwiftGraph (2.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.
此时,DerivedData中没有数据

启动Xcode时,出现链接器错误:

: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/Realm'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/RealmSwift'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftCharts'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftGraph'
: Linker command failed with exit code 1 (use -v to see invocation)
在编辑器中:

ld: framework not found SwiftCharts
在DerivedData下面的Debug iphonesimulator文件夹中,我没有看到任何警告指示应该存在的框架为什么框架目录丢失,为什么正在安装SwiftCharts但链接器不可用?

播客文件:

# Uncomment the next line to define a global platform for your project
platform :ios, '12.1'

target 'ProjectCoreData' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'SwiftCharts', '~> 0.6.3'
  pod 'SwiftGraph'
  pod 'OverlayContainer'
  pod 'RealmSwift'

  # Pods for ProjectCoreData

  target 'ProjectCoreDataTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'ProjectCoreDataUITests' do
    inherit! :search_paths
    # Pods for testing
  end

"Podfile" 24L, 549C
Podfile.lock:

PODS:
  - OverlayContainer (2.0.0)
  - Realm (3.14.1):
    - Realm/Headers (= 3.14.1)
  - Realm/Headers (3.14.1)
  - RealmSwift (3.14.1):
    - Realm (= 3.14.1)
  - SwiftCharts (0.6.5)
  - SwiftGraph (3.0.0)

DEPENDENCIES:
  - OverlayContainer
  - RealmSwift
  - SwiftCharts (~> 0.6.3)
  - SwiftGraph

我认为这是因为
SwiftCharts(0.6.5)
是为带有Xcode 10.2的swift 5.0构建的,所以它与Xcode 10.1不兼容,只需使用较旧版本的
SwiftCharts(0.6.3或更旧版本)。

Hm.看起来我在播客文件中指定了0.6.3,但是0.6.5一直被选中。@Joe你能用你的pod文件的内容更新你的问题吗?
~>0.6.3
意味着不低于
0.6.3
,因为你以前安装过
0.6.5
,CoCoCoapods会使用更高的版本,因此,只需使用
0.6.3
,而不使用
~>
。更进一步-获得分段错误。这肯定是一个不同的问题,我会把它作为答案,谢谢。