7
votes

Using Flash Builder 4.6 on some code from a client. Clicked on debug (also tried run) and received this error:

Process terminated unexpectedly.

initial content not found

Launch command details:  "C:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0
\bin\adl.exe" -runtime "C:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0
\runtimes\air\win" -profile mobileDevice -screensize 640x920:640x960 -XscreenDPI 326 -
XversionPlatform IOS "C:\Users\tstiffler\Adobe Flash Builder 4.6\TP\bin-debug\TP-
app.xml" "C:\Users\tstiffler\Adobe Flash Builder 4.6\TP\bin-debug"

How do I fix this? Please be as detailed as you can as I've never used Flash Builder before. Thanks!

9

9 Answers

14
votes

I had Main-app.xml file, in it I changed the following line

<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>

to

<content>{yourAppName}.swf</content>

and initial content problem was solved.

1
votes

I went to the app descriptor XML file just like hrehman, but mine just had the SWF file that I've been using - MyGame-iOS.swf - and I tried changing this to any other name (MyGame.swf), then tried building and running and it worked fine.

Not the best solution, but just in case someone goes to do what hrehman did, and doesn't see the square-bracketed message and is still stuck.

1
votes

I experienced this when my SWF-metadata was invalid. The swf was not even listed in the package content of my project. So, in short, be sure your swf-metadata is valid. I changed the value of backgroundColor from this (which works):

    [SWF(frameRate="60", width="480", height="800", backgroundColor="#000000")]

to

    [SWF(frameRate="60", width="480", height="800", backgroundColor="#0x0")]

The hash sign in backgroundColor should not have been there, and so I experienced the Flash Builder initial content error. Changing the second line to:

    [SWF(frameRate="60", width="480", height="800", backgroundColor="0x0")]

And my swf was once again included in the package.

0
votes

For me the opening the Main-app.xml file, change something insignificant and saving it again, worked. Maybe something to do with caching of build files or something? I must say, this was in 4.7 though.

0
votes

I think this happens after we change the location of the application's main mxml file. What fixes it for me is to ensure that YourApplication-app.xml and YourApplication.mxml are both located in /src folder. After that, rebuild the project should work.

0
votes

What worked for me was restoring my project's "bin-debug" folder (the directory where my compiled application is output) to a previous revision. Personally, I'm running Windows 7, so I just used the OS' revision control.

The other suggestions on this thread didn't work for me.

0
votes

@hrehma's answer is right. And further, if you're using a wrong namespace, compiler won't get the xml tag. This happens when you change your AIR SDK version.

  • Correct the content tag (like @hrehma said)
  • Correct the namespace in application.xml root.

For example if you're using AIR SDK 16:

change

<application xmlns="http://ns.adobe.com/air/application/15.0">

to

<application xmlns="http://ns.adobe.com/air/application/16.0">

Hope this may help you :)

0
votes

I think this error is a bit of a catch-all and is very unhelpful.

0
votes

This happen to me yesterday, I fixed it by creating a new project and copying everything in it except the main constructor as3 file. Then I copied the variables and functions from the old( broke ) main file and pasted them in the new one.

I think the reason is that the main class gets file gets corrupted somehow and flash builder cannot read it even though it looks fine in the editor.