Select to view content in your preferred language

ArcGIS Viewer for Flex 2.4 Error

1751
10
08-16-2011 01:16 PM
City_of_Port_Angeles_GIS
Occasional Contributor
I just downloaded the 2.4 API and imported it into Flash Builder 4. I noticed right away that the src folder had a red "x" on it! When I clicked on the folder I got an error message in the problems window that said: Could not resolve <s:ViewNavigatorApplication> to a component implementation.    WebMap.mxml    /BasicMap/src    line 5    Flex Problem

I can see the viewnavigatorapplication1_creationCompleteHandler function, but I can not find the ViewNavigatorApplication function. Until this error is fixed the code will not compile. Any help would be appreciated.
Thank you,
Billy
Tags (2)
0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Billy,

    When you have a question about the viewer post it to the viewer forum:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

From the What's New in 2.4 Viewer (under "General Changes"):
Compiling the source code [for ArcGIS Viewer for Flex] requires Adobe Flex 4.1 or above. This is to support Arabic and other right-to-left locales. Note that the API itself still works with 4.0, 4.1 as well as 4.5.


It's also mentioned briefly in the "Upgrading your viewer Code":
In version 2.4 of the Viewer, Adobe Flex 4.1 SDK is the minimum SDK version to compile with.


as posted by Bjorn in this thread
http://forums.arcgis.com/threads/35876-ArcGIS-API-for-Flex-2.4-just-released-%29?p=121408&viewfull=1...
0 Kudos
HoomanMohammadpour
Deactivated User
Did you ever get around the <s:ViewerNavigatorApplication> error? I have SDK 4.1 and API 2.4 but it still doesn't compile
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Did either of you add the swc to the libs folder as instructed in this link:

http://help.arcgis.com/en/webapi/flex/help/017p/017p0000001q000000.htm
0 Kudos
BjornSvensson
Esri Regular Contributor
@portangeles & @hoomanmoh,
While the thread title indicates your question is about the "Viewer", @portangeles error message makes me think you might be trying to create a Flex Mobile application.  If so ... The two "mobile" examples require Flex 4.5 SDK.  This is part of the "File->New->Flex Mobile Project" that is part of Adobe Flash Builder 4.5.
0 Kudos
HoomanMohammadpour
Deactivated User
duhh me..actually I was getting a compile error on a different project and not the Viewer. It compiles fine
0 Kudos
City_of_Port_Angeles_GIS
Occasional Contributor
Bjorn,
   No, I am not trying to build a mobile application. I downloaded the 2.4 API, brought it into Flash Builder 4 and immediately got the error described above. I have the 4.1 SDK configured under the compiler property but I still get the same error message. Any help would be appreciated. Do I need to upgrade my Flash Builder?
Billy
0 Kudos
BjornSvensson
Esri Regular Contributor
No, I am not trying to build a mobile application.


In your earlier post you mentioned that you can see "the viewnavigatorapplication1_creationCompleteHandler function".  This function is in mobile\WebMap\src\WebMap.mxml which is one of the "mobile" samples. So I'm a little confused on your setup.

In the ZIP file you downloaded with the samples there is one folder called "mobile" and one folder is called "samples".  The samples in "samples" should work fine in Flash Builder 4.  The samples in "mobile" require you to create "mobile application" (which is only available in Flash Builder 4.5).

Not sure if that clarifies things for you...
0 Kudos
City_of_Port_Angeles_GIS
Occasional Contributor
Bjorn,
   I just downloaded the Viewer source code instead of the API, and I still get the error message:
Could not resolve <s:ViewNavigatorApplication> to a component implementation.
It points to WebMap.mxml line 5
But all I see on line 5 is:
firstView="views.LoadingWebmapsView">
The whole spark component reads:
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                            xmlns:s="library://ns.adobe.com/flex/spark"
                            creationComplete="viewnavigatorapplication1_creationCompleteHandler(event)"
                            firstView="views.LoadingWebmapsView">
Billy
0 Kudos
BjornSvensson
Esri Regular Contributor
I just downloaded the Viewer source code instead of the API, and I still get the error message:
Could not resolve <s:ViewNavigatorApplication> to a component implementation.


The Viewer source code has nothing to do with the mobile example. 

The "WebMap.mxml" is not part of the viewer source code.  Did you manually add it? Or more likely ... do you have multiple projects open in your Flash Builder 4?  It sounds like you somewhere have an open project which has that mobile sample.

See the comment from "hoomanmoh":
"actually I was getting a compile error on a different project and not the Viewer. It compiles fine"

A screen capture might help us understand your setup...
0 Kudos