1 Reply Latest reply on Jan 19, 2010 9:55 AM by tzeng

    change in air 2.0Beta?

    ntf123

      Yesterday,  I patch the Air 2 Sdk to my sdk (3.2.0). I found that something is change and my code can not run properly.

       

      1. Lock File

          The xml file used in the project locked and can not save the file.

          When I use a text editor to open the xml file, It said the file is using by other program

       

      Load File:

                     var fileStream:FileStream = new FileStream();
                     fileStream.open(file, FileMode.READ);
                     this.rawData = XML(fileStream.readUTFBytes(fileStream.bytesAvailable));
                     fileStream.close();
      

      Save :

                     var fileStream:FileStream = new FileStream();
                     fileStream.open(this.file, FileMode.WRITE);
                     fileStream.writeUTFBytes(ContactData.getInstance().rawData);
                     fileStream.close();
      

       

      And it give a Error#0 in the debug box with no message.

      The problem solve after switch back to the original sdk.

       

      Also, the exported .air file can not be execute

      It say something like the setting of the application is wrong and contact the author

       

      .airappinstall.log:

      Starting app install of file:///C:/part/to/file.air
      UI SWF load is complete
      UI initialized
      Unpackaging to C:\Users\...\AppData\Local\Temp\fla48A3.tmp
      unpackaging is complete
      application is bound to side-by-side version 1.0
      application is bound to this version of the runtime
      app id ntf.PhoneBook
      pub id DB2112114A7E883717C2D1019E8D4C989D3B3B60.1
      Application located at C:\.....
      AIR file app id and/or pub id don't match
      installed app id null
      installed pub id null
      starting cleanup of temporary files
      application installer exiting
      

       

      Descriptor:

      <?xml version="1.0" encoding="utf-8" standalone="no"?>
      <application xmlns="http://ns.adobe.com/air/application/1.5">
      
      <!-- Adobe AIR Application Descriptor File Template.
      
           Specifies parameters for identifying, installing, and launching AIR applications.
      
           xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
                     The last segment of the namespace specifies the version 
                     of the AIR runtime required for this application to run.
                     
           minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
                     the application. Optional.
      -->
      
           <!-- The application identifier string, unique to this application. Required. -->
           <id>ntf.PhoneBook</id>
           <!-- Used as the filename for the application. Required. -->
           <filename>xxxx</filename>
      
           <!-- The name that is displayed in the AIR application installer. 
                May have multiple values for each language. See samples or xsd schema file. Optional. -->
           <name>xxxx</name>
      
           <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
           <version>0.1</version>
      
           <!-- Description, displayed in the AIR application installer.
                May have multiple values for each language. See samples or xsd schema file. Optional. -->
           <description> </description> 
      
           <!-- Copyright information. Optional -->
           <copyright> </copyright>
      
           <!-- Settings for the application's initial window. Required. -->
           <initialWindow>
                <!-- The main SWF or HTML file of the application. Required. -->
                <!-- Note: In Flex Builder, the SWF reference is set automatically. -->
                <content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
                
                <!-- The title of the main window. Optional. -->
                <!-- <title></title> -->
      
                <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
                 <systemChrome>none</systemChrome> 
      
                <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
                 <transparent>true</transparent> 
      
                <!-- Whether the window is initially visible. Optional. Default false. -->
                 <visible>true</visible>
      
                <!-- Whether the user can minimize the window. Optional. Default true. -->
                <!-- <minimizable></minimizable> -->
      
                <!-- Whether the user can maximize the window. Optional. Default true. -->
                <!-- <maximizable></maximizable> -->
      
                <!-- Whether the user can resize the window. Optional. Default true. -->
                <!-- <resizable></resizable> -->
      
                <!-- The window's initial width. Optional. -->
                <!-- <width></width> -->
      
                <!-- The window's initial height. Optional. -->
                <!-- <height></height> -->
      
                <!-- The window's initial x position. Optional. -->
                <!-- <x></x> -->
      
                <!-- The window's initial y position. Optional. -->
                <!-- <y></y> -->
      
                <!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
                <!-- <minSize></minSize> -->
      
                <!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
                <!-- <maxSize></maxSize> -->
           </initialWindow>
      
           <!-- The subpath of the standard default installation location to use. Optional. -->
            <installFolder>xxxx</installFolder> 
      
           <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
            <programMenuFolder>xxxx</programMenuFolder>
      
           <!-- The icon the system uses for the application. For at least one resolution,
                 specify the path to a PNG file included in the AIR package. Optional. -->
            <icon>
            <image16x16>images/icons/icon_16.png</image16x16>
               <image32x32>images/icons/icon_32.png</image32x32>
               <image48x48>images/icons/icon_48.png</image48x48>
               <image128x128>images/icons/icon_128.png</image128x128> 
           </icon>
      
           <!-- Whether the application handles the update when a user double-clicks an update version
           of the AIR file (true), or the default AIR application installer handles the update (false).
           Optional. Default false. -->
           <!-- <customUpdateUI></customUpdateUI> -->
           
           <!-- Whether the application can be launched when the user clicks a link in a web browser.
           Optional. Default false. -->
           <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
      
           <!-- Listing of file types for which the application can register. Optional. -->
           <!-- <fileTypes> -->
      
                <!-- Defines one file type. Optional. -->
                <!-- <fileType> -->
      
                     <!-- The name that the system displays for the registered file type. Required. -->
                     <!-- <name></name> -->
      
                     <!-- The extension to register. Required. -->
                     <!-- <extension></extension> -->
                     
                     <!-- The description of the file type. Optional. -->
                     <!-- <description></description> -->
                     
                     <!-- The MIME content type. -->
                     <!-- <contentType></contentType> -->
                     
                     <!-- The icon to display for the file type. Optional. -->
                     <!-- <icon>
                          <image16x16></image16x16>
                          <image32x32></image32x32>
                          <image48x48></image48x48>
                          <image128x128></image128x128>
                     </icon> -->
                     
                <!-- </fileType> -->
           <!-- </fileTypes> -->
      
      </application>