0

I have written a code to save my screen data and retrieve it for second time. Code is:

<?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"
    add="addHandler(event)">

<fx:Script>
    <![CDATA[

        import mx.events.FlexEvent;
        import spark.managers.PersistenceManager;
        protected function saveButton_clickHandler(event:MouseEvent):void
        {
            var saveManager:PersistenceManager = new PersistenceManager();
            saveManager.setProperty("myText", myInput.text);
        }

        protected function addHandler(event:FlexEvent):void
        {
            var loadManager:PersistenceManager = new PersistenceManager();
            if(loadManager.load())
            {
                var savedData:Object = loadManager.getProperty("myText");
                if(savedData)
                    myInput.text = savedData.toString();
            }
        }

        protected function clearButton_clickHandler(event:MouseEvent):void
        {
            var persistenceManager:PersistenceManager = new PersistenceManager();
            persistenceManager.clear();
            myInput.text = "";
        }
    ]]>
</fx:Script>

<s:TextInput width="100%" id="myInput"/>
<s:Group width="100%">
    <s:layout>
        <s:HorizontalLayout/>
    </s:layout>
</s:Group>
<s:Button id="saveButton" x="-1" y="65" width="100%" label="Save"
          click="saveButton_clickHandler(event)"/>
<s:Button id="clearButton" x="0" y="116" width="100%" label="Clear"
          click="clearButton_clickHandler(event)"/>

But, when I packaging it for deploying on iPad, it gives me a error like:

Error occurred while packaging the application:

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. Compilation failed while executing : ADT

I am using Flash builder 4.5 to create iOS application. Thanx in advance

Priscilla Jobin
  • 609
  • 7
  • 19
Naveed Mansuri
  • 439
  • 1
  • 5
  • 13

1 Answers1

0

You need to modify your FlashBuilder.ini file It's located in your FlashBuilder installation directory.

You need to modify the Xms size - this will allocate more memory while compiling and building project. Remember it should be in strongs of 2. My file looks like this:

launcher.defaultAction
openFile
-nl
en_US
-vmargs
-Xms256m
-Xmx512m
-XX:MaxPermSize=256m
-XX:PermSize=64m
Koby Douek
  • 16,156
  • 19
  • 74
  • 103