InternalCompilerError when I import the new Facebook 5.1 SDK into my existing project

感情迁移 提交于 2020-01-24 05:48:10

问题


If I import this package in a new project, I get no problems at all.

But, when I try to import it into my existing project (that had the 5.0.4 version of the SDK), after the importing finished, I get the followin error message:

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 

Anyone have any idea why this is happening?

(As extra information, in my project I have Itween & EasyTouch integrated)


回答1:


The problem was that in a Facebook wrapper class that I had for the invites, I had a FB.AppRequest call, which had the signature of the old FacebookSDK. This was causing the internal compiler error.

Hope it helps you guys, and dont lose a day like I did




回答2:


Unity doesn't support named parameters. So always use FB.AppRequest() function like this:

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


来源:https://stackoverflow.com/questions/22848490/internalcompilererror-when-i-import-the-new-facebook-5-1-sdk-into-my-existing-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!