将新的Facebook 5.1 SDK导入到现有项目中时出现InternalCompilerError

时间:2014-04-03 20:37:42

标签: facebook facebook-unity-sdk facebook-sdk-3.1

如果我在新项目中导入此包,我根本不会遇到任何问题。

但是,当我尝试将其导入我现有的项目(具有5.0.4版本的SDK)时,导入完成后,我收到以下错误消息:

Unhandled Exception: Mono.CSharp.InternalErrorException: Internal error

  at Mono.CSharp.MethodGroupExpr.IsApplicable (Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& arguments, Int32 arg_count, System.Reflection.MethodBase& method, System.Boolean& params_expanded_form) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& Arguments, Boolean may_fail, Location loc) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename unknown>:0 

任何人都知道为什么会这样?

(作为额外信息,在我的项目中,我将Itween&amp; EasyTouch集成)

2 个答案:

答案 0 :(得分:6)

问题在于我在邀请函中使用的Facebook包装器类中,我有一个FB.AppRequest调用,它具有旧的FacebookSDK的签名。这导致内部编译器错误。

希望它可以帮助你们,不要像我一样失去一天

答案 1 :(得分:4)

Unity不支持命名参数。所以总是像这样使用FB.AppRequest()函数:

        FB.AppRequest("WHAT'S UP?" //message
            , null //to
            , "" //filters
            , null //excludeIds
            , null //maxRecipients
            , "" //data
            , "ASKING YOU" //title
            , myCallback //callback
            );