【问题标题】:"CPTAnimation.m" Too many arguments to function call, expected 0, have 3“CPTAnimation.m” 函数调用的参数过多,应为 0,有 3
【发布时间】:2015-02-03 16:34:56
【问题描述】:

今天老板给我一个App,这个App是基于IOS SDK 8.1和xocde 6.1构建的。Podfile包括:

Uncomment this line to define a global platform for your project
platform :ios, ‘7.0’
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
def import_pods
pod 'AFNetworking', '~>2.5.0'
pod 'SDWebImage', '~>3.7.1'
pod 'CocoaLumberjack', '~> 1.9'
pod 'EasyMapping', '~> 0.6.3'
pod 'ReactiveCocoa', '~> 2.3.1'
pod 'libextobjc', '~>0.4.1'
pod 'CorePlot', '~>1.5.1'
#    pod 'ActionSheetPicker-3.0', '~>1.3.5'
#    pod 'MBProgressHUD', '~> 0.9'
end

完成 pod install 后,运行此应用程序,错误消息如下所示: setterMethod(boundObject, boundSetter, buffer);函数调用的参数太多,预期为 0,有 3 setterMethod(boundObject, boundSetter, tweenedValue);函数调用的参数太多,预期为0,有3个 这个问题来自“CPTAnimation.m”文件 任何人都可以告诉我这是怎么回事,请帮我解决它。非常感谢。

【问题讨论】:

  • 我将此 podfile 添加到一个新项目中。即使启用了迂腐警告,我也没有看到此错误。
  • 我在重新安装 cocopads 后解决了这个问题。

标签: core-plot


【解决方案1】:

修复在这里:https://github.com/IngmarStein/core-plot/commit/3413d8b7fa382921a918e7801a22e614a17b8bbf

您需要在项目中编辑 CorePlot 代码,否则您可以使用来自 GitHub 而不是来自 CocoaPods 的预发布版本 2.0。

【讨论】:

  • 按以下顺序帮助我: 1. 在 Podfile 中切换到 pod 'CorePlot', :git => 'https://github.com/IngmarStein/core-plot.git', :branch => 'release-2.0'。 2. 应用了来自https://github.com/IngmarStein/core-plot/commit/3413d8b7fa382921a918e7801a22e614a17b8bbf 的第二和第三代码块的更改。
【解决方案2】:

我想知道你的 cocoapods 的版本是什么?

在我的情况下,cocoapods 0.34.4 是可以的,而 cocoapods 0.36.0 遇到同样的问题。由于我还在 Podfile 中将 CorePlot 标记为 1.5.1,因此我猜 cocoapods 修改 Xcode 工作区的方式不同。

最后,我将 cocoapods 降级到 0.34.4。

【讨论】:

  • 就我而言。 0.36.4还是不行,必须降级到0.35.0。
猜你喜欢
  • 2014-09-15
  • 1970-01-01
  • 1970-01-01
  • 2019-03-27
  • 1970-01-01
  • 2019-07-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多