OK, I'm starting to get some visibility into what is happening now. The XML files are actually a secondary issue, which I haven't yet solved. But the primary issue is that when you export a release build, it doesn't pull from your swf file in the bin-debug folder, it makes a new one from your default as files (which of course does nothing, because in this instance I'm using a swf already made by Flash Pro).
At one point, I got an error, which left me with a bin-debug-temp. When I put my swf and xml files in there, I at least got the right swf into the apk (verified by changing the file extension to zip and then double-clicking the swf inside). This is not going to be a workable workflow for me long-term, so I need to figure out some way of telling it "use the swf and xml in the bin-debug folder, dummy!" I think that trying to just point it to the bin-debug folder as the src folder is how I got the error that let me put things into the bin-debug-temp file.
I also found that manually replacing the junk swf created by Flash Builder with the good file inside the apk/zip and renaming it to apk creates a file that won't install.
Thanks in advance!
Debug swf and release swf are differnt ones. One is compied with the debug flags and other not. And when the packager is called the targets are also diffrerent. And it checks whether the swf is of the expected type.
If you want to add any file for packaging, ideally it should be placed in the asset folder, so that it will be copied to the bin-release-temp folder.
However if you want to generically add an external file for packaging, you can achieve the same as follows.
In the export release, proced to the second page. Select the appropriate target from the table (if you have more than one target).
Bottom of the right side screen, you will see an option as "Customize Launch..". Once clicking on the option a UI is shown and it gives an option to add "add File to Package" please provide the complete path of the file.
Please try this out and let us know whether it worked.
Note: Customise Launch is a feature in FB 4.7
The swf file I created in Flash pro was not the debug version, but I did the steps listed in Renaun's blog post in order to get a Flash Pro swf packaged for AIR.
Based on your feedback, it looks like you didn't quite understand the process I took. This process uses the debug build process to create the .apk file, using my own Flash Pro swf (which was compiled in Flash Pro without the debug information). Do you think you could take a few moments to familiarize yourself with the steps I took by visiting the link I posted? For convenience, it is here: http://renaun.com/blog/2011/09/using-flash-builders-mobile-workflow-with-flash-professiona l-projects/ .
Alternatively, since Renaun is an Adobe employee and he is really familiar with the steps, is there any way he could be pulled into this discussion?
In Flash Builder 4.6, on the second page, I looked at all 4 tabs. None of them has a "Customize Launch" button. However, looking at this page http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb527199b6e138eabbcce9-8000. html , I don't think that this would have any effect on what I am trying to do. What I need to have happen is that Export Release Build does not overwrite my functioning Flash Pro MyApp.swf with the "placeholder" swf it currently creates from the more or less empty MyApp.as file that sits in the project with it. In summary, the swf I am referring to is not an asset. It is the swf that should be used as the basis for the entire apk package. I don't know what other words I could use to make it clearer than that.
First of all, let me apologize for not making the info obvious that Customize Launch is an Flash Builder 4.7.
I understand your requirement as follows.
You would like to use the swf created by Flash Pro (not interested in debugging the application)
You would like to use the apk creation and on device deployment of your application using Flash Builder.
So you would like Flash Builder not to overwrite your swf file with FB content.
If your requirements are same, you can achieve the same in the following ways.
FB 4.6 & FB 4.7
Create the swf (with the same name ) in Flash pro
Clean the FB project.
Switch of build automatically (this will ensure that the new swf is not getting created)
place the swf in the bin-debug folder
Use the Run configuration and try to launch the app.
Problem: When you switch on the Build automatically the file will get overwritten.
in FB 4.7
You can configure your packager inputs and yet use the infrastructure of FB for packaging, debugging/running and deployment as applicable.
Customize Launch is the way to go for that.
FB 4.7 is available for trial.
Thank you so much--your feedback enabled me to think through this and get to the critical piece I was missing. I've marked it helpful, because it pointed the way.
I'm not a big fan of marking one's own answers "correct," but I'm going to do that this time so that people can easily find the steps.
The mistake I was making was thinking that the "Debug on device" was not going to push out a debug AIR version, because the swf was not a debug swf.
I didn't understand that if I clicked the Run button, that this would also push a version out to the device, and that this version would not give the "waiting to connect to the debugger" message.
The whole process you get when you click "Run" is a little odd (I say this for those who have never tried it). It will install the app to the device, but doesn't launch it (I think it can't). Flash Builder then hangs in "Installing application to device." If you actually look at the screen, you will see a new download in your notifications bar, and from there you can launch the app.
- To get started packaging your Flash Pro swf for Air using Flash Builder, follow Renaun's steps (http://renaun.com/blog/2011/09/using-flash-builders-mobile-workflow-with-flash-professiona l-projects/)
- In the process of getting this working on Mobile, you probably have a debug version installed on your phone. Uninstall this using Astro File Manager (https://play.google.com/store/apps/details?id=com.metago.astro&hl=en)
- Instead of clicking the "Debug" button in Flash Builder, click "Run." This makes a non-debug apk and pushes it to your phone (if your configuration allows for debugging on the device).
Additional notes: if you have xml files that are packaged into the apk file and you're using URLLoader (because the app originates as a web app), add "app:/" to the beginning of the URL string you are using. So "xml/myFile.xml" becomes "app:/xml/myFile.xml". If you need to keep your original web app logic, add a conditional on Capabilities.playerType=="Desktop."
Hope this helps someone else with the same problems