Code-behind gotcha in Flex Builder for AIR apps
If you're using code-behind in your AIR apps, there's a little gotcha you should watch out for: Flex Builder doesn't like it if you include your code behind class in the root package.
For example, if your main MXML file is Main.mxml and your code-behind class is MainClass.as, Flex Builder gets confused and thinks that there should be two application configuration files (one for the MXML file and one for the AS file.) If your app.xml file is named Main-app.xml, you'll get an error along the lines of Adobe AIR application is missing the corresponding MainClass-app.xml.
The workaround is simple, just move your code-behind class off of the root package. e.g., put it in com.mydomain.myapp.view
.
Comments
by Phil Desenne on 2009-02-20 20:42:12
by Steven Peeters on 2010-04-17 17:31:51
by Peter on 2010-04-12 12:57:39
by YopSolo on 2010-06-28 13:13:07
by Ercan Bozoglu on 2010-06-16 21:57:07
by Jeremy on 2011-02-04 10:08:03