Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 331
Gaston Claret Avatar asked Dec 25 '22 11:12

Gaston Claret


2 Answers

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

like image 181
Gaston Claret Avatar answered May 26 '23 08:05

Gaston Claret


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
            );
like image 32
Ethan Avatar answered May 26 '23 07:05

Ethan