4 Replies Latest reply on Nov 3, 2011 9:30 PM by Max Dx

    FB 4.5.1 iOS Packaging error

    dm106

      Hi,

       

      I have Flash Builder 4.5.1 on Windows 7 32bits with 4GB of RAM. When I try to generate a .ipa with the Project > Export release build... I get the following error message:

       

      Error occurred while packaging the application:

      Error ocurred during initialization of VM

      Could not reserve enough space for object heap

      Could not cerate the Java virtual machine

      Compilation failed while executing: ADT

       

      I am able to compile the .ipa file from the command line with the follogin options:

       

      java -Xms384m -Xmx448m -jar adt.exe [...]

       

      Is it possible to pass this arguments to adt through Flash Builder?

       

      PD: I currently run Flash Builder with this configuration into FlashBuilder.ini, I don't know if it has any related side effect:
      ...

      -Xms256m
      -Xmx384m

      ...

       

      Message was edited by: dm106

        • 1. Re: FB 4.5.1 iOS Packaging error
          dm106 Level 1

          I tried setting the arguments with these configuration files:

           

          Adobe Flash Builder 4.5/FlashBuilderC.ini

          Adobe Flash Builder 4.5/sdks/4.5.1/bin/adt.bat

          Adobe Flash Builder 4.5/sdks/4.5.1/bin/jvm.config

           

          but I get the same error. Any ideas?

          • 2. Re: FB 4.5.1 iOS Packaging error
            Aka_Oni

            I do have same problem, can't wait to see my first flash app on iPad...

            • 3. Re: FB 4.5.1 iOS Packaging error
              ViresXXX

              Same problem Can you tell me how to pack it using command line (adt)?

               

              EDIT:

              I've managed to compile it with my script:

               

               

              @echo=off

              @cd bin-release-temp

              @

              @set java_cmd=C:\Programy\Java\jre6-32\bin\java.exe

              @set java_param=-Xms384m -Xmx448m -jar

              @

              @set adt_cmd="C:\Programy\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\lib\adt.jar"

              @set target=ipa-debug

              @

              @set cert=..\cert\iphone_cert.p12

              @set cert_pass=password

              @set provisioning=..\cert\gadget.mobileprovision

              @

              @set build_file=..\build\gadget.ipa

              @set desc_files=..\bin-release-temp\gadget-app.xml

              @set files=gadget.swf assets

              @

              %java_cmd% %java_param% %adt_cmd% -package -target %target% -storetype pkcs12 -keystore %cert% -storepass %cert_pass%  -provisioning-profile %provisioning% %build_file% %desc_files% %files%

              @

              @cd..

              pause

               

               

              I need to install 32-bit java for ADT ;o

              However it took me 25 minutes and consumed 1 243 MB od RAM for "java.exe" and about 120MB for "i686-apple-darwin9-Id64.exe".

              Temporary file AOTBuildOutput.asm was 83MB and output file 10Mb.

              Is it normal for iOS?

              • 4. Re: FB 4.5.1 iOS Packaging error
                Max Dx

                I've got the same error and wasted the most of the day to find nice solution for Flash. Hope it will fit Flash Builder too.

                We need to add -Xms64M -Xmx512M java params here, but the way Flash invokes java makes it nearly impossible.

                 

                Here is my java wrapper, that deals with this error. You need to install it to Java "Bin" folder. I'm just not sure, which JRE Flash Builder uses - the same as Flash or its own (it has one in its folder). If you need to alter the params, edit "starter.ini" file.