I have an application which is developed using agslib 2.1. I want to migrate t to agslib3.1. When I use the new library, There is an error in MapManager.mxml code as "Call to a possibly undefined method zoomToFullExtent through a reference with static type com.esri.ags.tools:NavigationTool." I could not find any updated MapManager.mxml in FlexViewer version 3.1. So I was thinking that maybe I must follow a process for migrating from 2.1 to 3.1. does anybody know how I can migrate my code to use the new library, or any workaround for resolving the issue?
Did you just update the API Library (and keep the 2.x viewer source code) or did you move to the 3.1 source code (with the 3.1 API Library)? The latter is going to be much easier...
The MapManager still exists. See https://github.com/Esri/arcgis-viewer-flex/blob/master/src/com/esri/viewer/managers/MapManager.mxml
As for migration steps see http://resources.arcgis.com/en/help/flex-api/concepts/index.html#/Migrating_from_2_5_to_3_0/017p00000024000000/ which lists lots of information about successfully migrate from 2.x to 3.0.
However, starting with the 3.x code base and moving your specific customization across is going to be much easier than trying to upgrade the whole 2.x viewer code base to 3.x. Using the 3.1 code base will also make it much easier for you to take advantage of new versions.