Site icon SmartTutorials.net

Cannot Resolve a Multiname Reference Unambiguously JSON In Flash Builder 4.6 with SmartFox Server

Adobe has introduced native JSON support in Flash Player 11 as well in the subsequent versions of the Flash player, this error mainly happens because package name collision in the as3corelib (action Script  core library) with JSON class in the flash player. where Cannot Resolve a Multiname Reference Unambiguously JSON clearly says the error due to two or more classes with same name.

I am using Flash builder 4.6 with Flash player 11 for the development. When I try connect SmartFox server using Action Script 3 in Flash Builder 4.6 it shows following the error.


I am sugesting simple solution to avoid the above error, Find the SmartFoxClient.as file in your installed directory (it/gotoandplay/smartfoxserver/SmartFoxClient.as).

Now look for the following two lines code

1. JSON.encode(obj)

2. JSON.decode(msg)

where JSON class referred with unqualified names that leads JSON class name collision. To avoid this error refer the above JSON class with their fully qualified name, so change the above lines like one shown in the below manner.

com.adobe.serialization.json.JSON.encode(obj)

com.adobe.serialization.json.JSON.encode(obj)

 

 .

Exit mobile version