问题
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