2 Replies Latest reply on Aug 8, 2011 12:07 PM by she.ugly

    Flash Builder 4.5.1 Creating iOS Mobile App creates components not Spark views

    skyfireLondon

      Hi

       

      I have Flash Builder 4.5.1 on Windows 7 using SDK 4.5.1.

       

      Following many of the Hello World video tutorials (including what's on Adobe TV's website) I create a new Mobile based Application in Flash Builder. I set it up to be a View Based Application targeting iOS and iPhone (although the problem is for any iOS device).

       

      I follow all the instructions and yet the MXML that's created at the end is component based and not targeting Spark Views. This floors running or viewing the app! Code for both Application class and View is as follows:

       

      <?xml version="1.0" encoding="utf-8"?>
      <components:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                           xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" firstView="views.MyMobileProjectHomeView" applicationDPI="240">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
      </components:ViewNavigatorApplication>



      <?xml version="1.0" encoding="utf-8"?>
      <components:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" title="HomeView">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
      </components:View>

       

      I have no idea why Flash Builder is creating code that's namespaced to components and not the spark framework.

       

      The code that's created in the course is below and yet if I import their project and try and view in Design view Flash Builder tells me 'An unknown item is declared as the root of your MXML document. Switch to source mode to correct it.':


      <?xml version="1.0" encoding="utf-8"?>
      <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                  xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.HelloWorldHomeView" applicationDPI="240">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
      </s:ViewNavigatorApplication>

       


      <?xml version="1.0" encoding="utf-8"?>
      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:Label text="Hello World"/>
      </s:View>

       

      Please help

       

      Many thanks in advance

       

      David