类型参数不能应用于 PFAnalytics 和 PFObject 中的非参数化类 BFTask [英] Type arguments cannot be applied to non-parameterized class BFTask in PFAnalytics and PFObject

查看:24
本文介绍了类型参数不能应用于 PFAnalytics 和 PFObject 中的非参数化类 BFTask的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的项目更新到 iOS 9、我的 podfile 和所有必需的文件,但它无法构建.我悲痛的根源在于以下错误消息:

I've updated my project to iOS 9, my podfile, and all necessary files, but it will not build. The source of my grief is in the following error message:

类型参数不能应用于非参数化类 'BFTask'

这是唯一显示的错误,但它在 PFAnalytics.h 和可能更重要的 PFObject.h 中多次出现.

This is the only error that shows, but it shows up multiple times in both PFAnalytics.h and probably more importantly PFObject.h.

有人能告诉我这是什么意思并请提出解决方案吗?我希望我提供了足够的信息,但如果没有,请告诉我!

Could someone tell me what this means and please suggest a solution? I hope I have provided enough information, but if not, let me know!

代码示例如下:在PFObject.hPFAnalytics.h中,到处都是:

The code samples are as follows: In PFObject.h and PFAnalytics.h, everywhere there is the following:

(BFTask PF_GENERIC(XXSOMECLASS *)*) someMethod; 

错误被抛出.这不是我的代码,如前所述,它是 PFObject.hPFAnalytics.h.PFObject.h 中抛出错误的函数示例如下

the error is thrown. This is no code of mine, it is PFObject.h and PFAnalytics.h as stated before. Examples of the functions throwing the error in PFObject.h are below

- (BFTask PF_GENERIC(NSNumber *)*)saveInBackground; 
- (BFTask PF_GENERIC(NSNumber *)*)saveEventually;
- (BFTask PF_GENERIC(NSNumber *)*)deleteInBackground;
+ (BFTask PF_GENERIC(NSNumber *)*)saveAllInBackground:(PF_NULLABLE NSArray *)objects;
+ (BFTask PF_GENERIC(NSNumber *)*)deleteAllInBackground:(PF_NULLABLE NSArray *)objects;
// .... etc

当点击停止标志时,建议是删除PF_GENERIC(NSNumber *),导致这样的方法

when clicking on the stop sign the suggestion is to delete PF_GENERIC(NSNumber *), resulting in a method like this

 - (BFTask *)xxsomeMethod; 

但这无济于事,因为它只会变得更加混乱

but that doesn't help as it just gets a lot messier

更新 02:我的 Podfile 的内容:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'

target: 'BMR' do 
    pod 'AFNetworking', '~> 2.6' 
    pod 'ParseFacebookUtils', '~> 1.8' 
    pod 'Parse' 
    pod 'ParseUI', '~> 1.1' 
    pod 'FBSDKCoreKit', '~> 4.6' 
    pod 'FBSDKLoginKit', '~> 4.6'
    pod 'JSQMessagesViewController', '~> 7.2'
    pod 'IDMPhotoBrowser', '~> 1.7' 
    pod 'RNGridMenu', '~> 0.1' 
    pod 'APHorizontalMenu', '~> 1.3' 
    pod 'ASIHTTPRequest', '~> 1.8' 
    pod 'AutoScrollLabel', '~> 0.4' 
    pod 'CJAMacros', '~> 2.1' 
    pod 'CrittercismSDK', '~> 5.3'
end

推荐答案

确保您没有重复版本的 Bolts.framework.

如果您同时使用 Parse SDK 和 Facebook SDK,您会遇到一个问题,即 Parse SDK 包含旧版本的 Bolts(当前为 1.1.5)而 FB SDK 包含最新版本的 Bolts SDK(>= 1.2.2)

If you are using both Parse SDK and Facebook SDK you will encounter a problem where Parse SDK contains an older version of Bolts (currently 1.1.5) and the FB SDK has the newest version of Bolts SDK (>= 1.2.2)

一旦您删除了 Parse SDK 附带的旧版本 Bolt.framework,您应该没问题.

Once you remove an older version of the Bolt.framework that comes with Parse SDK you should be fine.

要检查 Bolts.SDK 的版本,只需转到 Bolts.framework 文件,右键单击并选择获取信息".

To check what version of Bolts.SDK you have simply go to the Bolts.framework file, right - click and choose "Get Info".

这篇关于类型参数不能应用于 PFAnalytics 和 PFObject 中的非参数化类 BFTask的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆