谷歌API错误"名为“initWithArray:”多种方法找到" [英] Google Api error "Multiple methods named 'initWithArray:' found"

查看:214
本文介绍了谷歌API错误"名为“initWithArray:”多种方法找到"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是谷歌日历API和我得到两个错误。

I am using the google calendar api and I am getting two errors.


  1. GTMGatherInputStream.m:25:13:命名为initWithArray:多种方法找到

  1. GTMGatherInputStream.m:25:13: Multiple methods named 'initWithArray:' found

#import "GTMGatherInputStream.h"
@implementation GTMGatherInputStream
+ (NSInputStream *)streamWithArray:(NSArray *)dataArray {
    return [[[self alloc] initWithArray:dataArray] autorelease]; //error on this line
}


  • GTMOAuth2Authentication.h:31:11:'GTMSessionFetcher.h找不到文件

  • GTMOAuth2Authentication.h:31:11: 'GTMSessionFetcher.h' file not found

    #if GTM_USE_SESSION_FETCHER
    #import "GTMSessionFetcher.h" //GTMSessionFetcher.h file not found error
    #else
    #import "GTMHTTPFetcher.h"
    #endif  // GTM_USE_SESSION_FETCHER
    


  • 我已经在网上随处可见的研究和错误我都一无所获。我正在GM埃尔卡皮坦与通用X $ C $ 7.0Ç。我试图解决它,并没有奏效多种不同的方式。我的code将无法编译。我该如何解决这个问题?

    I have researched the error everywhere online and I have found nothing. I am running GM El capitan with GM Xcode 7.0. I Have tried multiple different ways on solving it and nothing has worked. My code will not compile. How do I fix this?

    推荐答案

    我认为谷歌将实行定为这在不久的将来;在此期间,我们可以做一对夫妇的黑客来解决这些问题:

    I assume Google is going to implement a fix for this in the near future; in the meantime, we can do a couple of hacks to get around those issues:


    1. 改变返回[[[自我页头] initWithArray:dataArray中]自动释放];

    返回[[(GTMGatherInputStream *)[自行页头] initWithArray:dataArray中]自动释放];

    改变

    #ifndef GTM_USE_SESSION_FETCHER
    #define GTM_USE_SESSION_FETCHER 1
    #endif
    

    #ifndef GTM_USE_SESSION_FETCHER
    #define GTM_USE_SESSION_FETCHER 0
    #endif
    


    我不得不做这两个地方 GTM_USE_SESSION_FETCHER 定义。

    I had to do this in two places where GTM_USE_SESSION_FETCHER was defined.

    最后一件事,是去到GTL项目构建设置,以及苹果LLVM 7.0警告德precated功能为NO。有了这些3个步骤的日历API编译成功上iOS9。

    One final thing, was to go to the GTL project build settings, and set Apple LLVM 7.0 warnings Deprecated Functions to NO. With these 3 steps the Calendar API compiles successfully on iOS9.

    这篇关于谷歌API错误"名为“initWithArray:”多种方法找到"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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