• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Export release build not including XML data files in apk package

Guide ,
Sep 12, 2012 Sep 12, 2012

Copy link to clipboard

Copied

Hi, all;

I have a flash pro project that I have packaged for AIR based on these steps:

http://renaun.com/blog/2011/09/using-flash-builders-mobile-workflow-with-flash-professional-projects...

There are two differences:

  1. I am loading XML files from right next to the swf
  2. The Flash Pro project and the Mobile project are sharing a directory that is outside of both projects (this was the workflow already established in FP, since multiple swfs share the same XML).

When I test this on my phone, it adds the XML files to the apk and everything works great. The problem I am having is that the Export Release Build does not have the XML files included, and I don't see anything in the Flash Builder interface that looks like it will allow me to add other files than the swf and the app.xml.

android.png

What am I missing?

Views

3.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Sep 19, 2012 Sep 19, 2012

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, th

...

Votes

Translate

Translate
Guide ,
Sep 12, 2012 Sep 12, 2012

Copy link to clipboard

Copied

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.

Ideas?

Thanks in advance!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

Since Renaun is an evangelist for Adobe, is it at all possible that someone could contact him and call his attention to this thread?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

Hi, Amy -

I'll bring this thread to the attention of the Flash Builder product team.

Thanks,

Mallika Yelandur

Adobe Community Help & Learning

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

Thanks, Mallika!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 17, 2012 Sep 17, 2012

Copy link to clipboard

Copied

Hi, Mallika;

Could you please remind them again? It seems they haven't managed to get to it.

Regards;

Amy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2012 Sep 17, 2012

Copy link to clipboard

Copied

Hi,

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 18, 2012 Sep 18, 2012

Copy link to clipboard

Copied

Hi, Rani;

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-professional-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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 19, 2012 Sep 19, 2012

Copy link to clipboard

Copied

Hi,

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.

Rani Kumar

ranik@adobe.com<mailto:ranik@adobe.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 19, 2012 Sep 19, 2012

Copy link to clipboard

Copied

LATEST

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 summarize:

  1. 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-professional-projects...)
  2. 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)
  3. 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines