IntelliJ, AIR Mobile, and Dropbox


I am using Dropbox as a hassle-free way of versioning and sharing my source files.

Clearly, I don't want any binaries on there.

With IntelliJ and Java, it all works fine to have a content root in dropbox and all project output outside Dropbox; everything compiles and runs just fine.

With IntelliJ and Flex/AIR however, if I do exactly the same, everything compiles just as well, but I get the error "initial content not found" upon running with adl.

Supposing I have a project in /Users/Steven/Documents/FlexProjects/Test and my sources/assets in /Users/Steven/Dropbox/FlexProjects/Test, how do I make this work? I must be missing something.

Best regards! Steven

Comment actions Permalink

Looks like you need to fix 'Root directory' in AIR run configuration. Usually it should point to the folder where compiled swf is placed. If it doesn't help please paste screenshot of run configuration.

Comment actions Permalink

Hi Alexander,

Let me first say that you guys are amazing. Best customer support I have seen in a long time.

Here's what I have. I'm on Mac OS X Snow Leopard by the way.

In the below, I have obfuscated the name of one folder (also in the images). It's a company name that is not yet registered. Let us assume it is XYZ.

My source files are in:

My project and output directory is:
(IntelliJ appends out/production/TaxiProposalScreens)

Pressing run gives me this output:

/Applications/Adobe Flash Builder 4.5/sdks/4.5.1/bin/adl -profile mobileDevice -screensize iPhone /Users/stevendejong/Dropbox/XYZ/Flex/Taxi/ProposalScreens/src/TaxiProposalScreens-app.xml /Users/stevendejong/Documents/FlexProjects/TaxiProposalScreens/out/production/TaxiProposalScreens
initial content not found

Process finished with exit code 8

I attached a screenshot of the run configuration and the content of the three folders (sources, project, output).

Here is also the iml file, which as you can see is in the project folder.

<?xml version="1.0" encoding="UTF-8"?>
<module type="Flex" version="4">
  <component name="Flex.Build.Configuration">
    <option name="DO_BUILD" value="true" />
    <option name="MAIN_CLASS" value="TaxiProposalScreens" />
    <option name="OUTPUT_FILE_NAME" value="TaxiProposalScreens.swf" />
    <option name="TARGET_PLAYER_VERSION" value="10.2.0" />
    <option name="VERSION" value="3" />
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$USER_HOME$/Dropbox/XYZ/Flex/Taxi/ProposalScreens">
      <sourceFolder url="file://$USER_HOME$/Dropbox/XYZ/Flex/Taxi/ProposalScreens/src" isTestSource="false" />
    <orderEntry type="jdk" jdkName="4.5.1 AIR Mobile" jdkType="AIR Mobile SDK Type" />
    <orderEntry type="sourceFolder" forTests="false" />

If you need anything else to solve this mystery, let me know. I am willing to (1) try things and (2) share the actual files, but not on the forum :-)

Best, Steven

Comment actions Permalink

Looks like you need to fix <content/> tag in TaxiProposalScreens-app.xml file. It must contain your SWF file name:

Comment actions Permalink

Thanks so much. This fixes it.

I've now changed what was betweem <content></content> in TaxiProposalScreens-app.xml to TaxiProposalScreens.swf.
Important: I had to do this manually in the output directory; doing it only in the source directory did not work.

Just so we understand.
Is this problem caused by importing the sources of a project that was done in FlashBuilder (i.e. not the whole project)?
Would IntelliJ set the content tag accurately otherwise (e.g. if I start from a blank src module, or import the whole project)?
Or should the user set it in the output XML always?

Best regards, Steven

Comment actions Permalink

<content> should be fixed in the file that is set as descriptor in run configuration. Your screenshot shows that it is  TaxiProposalScreens-app.xml from src, not from output. Anyway IDEA copies resources (including xml files by default) from src to output folder according to File | Settings | Compiler | Resource patterns. So it doesn't matter which of TaxiProposalScreens-app.xml you use in run configuraton.
The issue is cause by a bit different concept in IDEA and FB. IDEA doesn't use descriptor template concept and doesn't fix descriptor when imports FB projects that results in your issue:
So far IDEA users need to keep descriptor up-to-date manually.

We'll introduce air descriptor template concept as well as completely new Flex project setup in one of upcoming IDEA releases. But first we'll probe it in new product with code name Astella: Second EAP (to be released later this week) will contain import of FB projects.

Comment actions Permalink

Great -- I am also giving Astella a try already for a few days. Good work in progress!

Comment actions Permalink


New project (let's call it MyApp), same problem. I've made the project from scratch this time in IntelliJ, linking to existing sources on my Dropbox. The <content> tag is filled (it says "MyApp.swf" and MyApp.swf is located in the root directory specified, /out/production/MyApp).

1. I can start the program if I use the "Main class" method, but then I cannot set options for ADL that the screen should be rotatable and that the default orientation should be landscape.
2. Starting with an AIR Application descriptor (MyApp-app.xml) gives the "Initial Content Not Found" error.

I really don't know what I have been doing wrong, but it must be SOMETHING :-)

Best, Steven

A second project I just created using sources from Dropbox DID work after I changed the <content> tag, so I went back to the first project (MyApp) to check it further.

Upon opening the project, the Run Configurations had forgotten the Module SDK. When I set it, the dialog box told me that the module isn't a Flex module and does not contain Flex facets... So I went to Project Properties and added a Flex facet. Made the Run Configuration. First run then prompts for a Main class. I select the right one (MyApp), and see the right SWF file name in the MyApp-app.xml file. Yet still I have "Initial Content Not Found".

Comment actions Permalink

There's no magic in what IDEA does. You see adl command line in IDEA console so you always can analyze yourself what is going wrong. Adl syntax is here. Basically the main thing you should check is that path to SWF written as 'initialContent' in app descriptor is the relative path from root directory set in run configuration.


Please sign in to leave a comment.