The problem has been isolated, so a solution can't be far off (I hope)! I've created a "barebones" AIR application that exhibits the same behavior. Turns out, when I use the mx:Application tag, everything works perfectly. However, when I use s:Application, the problem occurs (a blank window with no contents).
I've tried explicitly adding the sparks-theme dependency as well as airspark (even though it's already included in the air-framework POM) and it didn't fix the problem. What am I missing here? Here is my "barebones" application. When I change s: to mx:, everything works! However, when I use sparks components, it produces an AIR file just fine but the resulting installed application displays a "properly sized" window with a title but no contents. (Note: if I link a CSS file and set the background color to blue, the window is successfully colored blue. It seems the problem is with Sparks)... src/main/flex/Main.mxml: ----------------------------------- <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:s="library://ns.adobe.com/flex/spark"> <s:Button label="it works" top="100" /> </s:Application> ----------------------------------- src/main/resources/descriptor.xml: ----------------------------------- <?xml version="1.0" encoding="utf-8" standalone="no"?> <application xmlns="http://ns.adobe.com/air/application/2.6"> <id>Main</id> <filename>Main</filename> <name>Main</name> <versionNumber>0.1.0</versionNumber> <initialWindow> <content>Main.swf</content> <autoOrients>false</autoOrients> <fullScreen>false</fullScreen> <visible>true</visible> </initialWindow> </application> ----------------------------------- pom.xml ----------------------------------- <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany</groupId> <artifactId>barebones-air</artifactId> <version>1.0</version> <packaging>air</packaging> <name>barebones-air</name> <properties> <flex.sdk.version>4.5.1.21328</flex.sdk.version> <application.name>Main</application.name> <directory.resources>src/main/resources</directory.resources> <store.password>oursecret</store.password> </properties> <build> <sourceDirectory>src/main/flex</sourceDirectory> <plugins> <plugin> <groupId>org.sonatype.flexmojos</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>4.0-SNAPSHOT</version> <configuration> <sourceFile>${application.name}.mxml</sourceFile> <finalName>${application.name}</finalName> <storepass>${store.password}</storepass> <descriptorTemplate>${directory.resources}/descriptor.xml</ descriptorTemplate> </configuration> <extensions>true</extensions> <dependencies> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>compiler</artifactId> <version>${flex.sdk.version}</version> <type>pom</type> </dependency> </dependencies> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>air-framework</artifactId> <version>${flex.sdk.version}</version> <type>pom</type> </dependency> </dependencies> <repositories> <repository> <id>central</id> <name>Artifactory</name> <url>http://ourserver/artifactory/repo</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>flexmojos-plugin</id> <url>http://repository.sonatype.org/content/groups/flexgroup</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </project> ----------------------------------- On Nov 29, 10:07 am, gMale Another <[email protected]> wrote: > My issue seemed to arise after updating the runtime, as well (Note: > I'm running OS X Lion). Right now, I'm working on creating a bare- > bones project to see if it has the same issue and, if so, I will > upload THAT POM & descriptor (because our current one mainly > references a parent POM that I can't post online). > > On Nov 29, 5:17 am, "Will Hoover" <[email protected]> wrote: > > > > > > > > > I have also experienced this issue with flexmojos. It works fine using > > adt... It looks like it is related to the cert signing. It first occurred > > when I tried updating the AIR runtime (sorry I do not recall the version off > > hand). > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] On > > > Behalf Of Marvin Froeder > > Sent: Monday, November 28, 2011 5:58 AM > > To: Flex Mojos > > Subject: [flex-mojos] Re: compiled AIR app has no window > > > Are you guys able to get your air projects building using adt? > > > I ask cause FB may add something to your compilation that you guys are > > unaware of. > > > On Nov 28, 7:24 am, Miroslav Hrúz <[email protected]> wrote: > > > Hi, > > > > I was playing with FlexMojos to build AIR project and same thing > > > happend to me. I tried more different versions of Flex, FlexMojos on > > > MacOS X Lion and Windows.. Same thing. > > > > There is sample hello world project. > > > > airtest > > > src > > > airtest.mxml > > > airtest-app.xml > > > src > > > main > > > resources > > > descriptor.xml (which is copy cat of airtest-app.xml) > > > pom.xml > > > > pom.xml: > > > > <project xmlns="http://maven.apache.org/POM/4.0.0" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4...."> > > > <modelVersion>4.0.0</modelVersion> > > > <groupId>airtest</groupId> > > > <artifactId>airtest</artifactId> > > > <version>0.0.1-SNAPSHOT</version> > > > <packaging>swf</packaging> > > > <name>airtest</name> > > > <properties> > > > <flex.framework.version>4.5.1.21328</flex.framework.version> > > > <keystore.file>certificate</keystore.file> > > > <keystore.password>pass</keystore.password> > > > </properties> > > > <build> > > > <sourceDirectory>src</sourceDirectory> > > > <plugins> > > > <plugin> > > > <groupId>org.sonatype.flexmojos</groupId> > > > <artifactId>flexmojos-maven-plugin</artifactId> > > > <version>4.0-RC2</version> > > > <extensions>true</extensions> > > > <configuration> > > > <sourceFile>./airtest.mxml</sourceFile> > > > <debug>true</debug> > > > <showWarnings>false</showWarnings> > > > <debug>true</debug> > > > <configurationReport>true</configurationReport> > > > <headlessServer>true</headlessServer> > > > <flexBuilderCompatibility>true</flexBuilderCompatibility> > > > <sourceFile>./${project.name}.mxml</sourceFile> > > > <descriptorTemplate>${basedir}/src/${project.name}-app.xml</ > > > descriptorTemplate> > > > <keystore>${keystore.file}</keystore> > > > <storepass>${keystore.password}</storepass> > > > > </configuration> > > > <dependencies> > > > <dependency> > > > <groupId>com.adobe.flex</groupId> > > > <artifactId>compiler</artifactId> > > > <version>${flex.framework.version}</version> > > > <type>pom</type> > > > </dependency> > > > <dependency> > > > <groupId>com.adobe.flex.compiler</groupId> > > > <artifactId>adt</artifactId> > > > <version>${flex.framework.version}</version> > > > </dependency> > > > </dependencies> > > > > <executions> > > > <execution> > > > <goals> > > > <goal>sign-air</goal> > > > </goals> > > > </execution> > > > </executions> > > > </plugin> > > > </plugins> > > > </build> > > > > <dependencies> > > > > <dependency> > > > <groupId>com.adobe.flex.framework</groupId> > > > <artifactId>air-framework</artifactId> > > > <version>${flex.framework.version}</version> > > > <type>pom</type> > > > </dependency> > > > </dependencies> > > > > <repositories> > > > <repository> > > > <id>flex-mojos-repository</id> > > > <url>http://repository.sonatype.org/content/groups/flexgroup</url> > > > <releases> > > > <enabled>true</enabled> > > > </releases> > > > <snapshots> > > > <enabled>true</enabled> > > > </snapshots> > > > </repository> > > > <repository> > > > <id>nexus</id> > > > <url>http://localhost:8081/nexus/content/repositories/thirdparty/</ > > > url> > > > <releases> > > > <enabled>true</enabled> > > > </releases> > > > <snapshots> > > > <enabled>false</enabled> > > > </snapshots> > > > </repository> > > > </repositories> > > > <pluginRepositories> > > > <pluginRepository> > > > <id>flex-mojos-plugin-repository</id> > > > <url>http://repository.sonatype.org/content/groups/flexgroup</url> > > > <releases> > > > <enabled>true</enabled> > > > </releases> > > > <snapshots> > > > <enabled>true</enabled> > > > </snapshots> > > > </pluginRepository> > > > </pluginRepositories> > > > </project> > > > > airtest.mxml: > > > > <?xml version="1.0" encoding="utf-8"?> > > > <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" > > > xmlns:s="library://ns.adobe.com/flex/spark" > > > xmlns:mx="library://ns.adobe.com/flex/mx"> > > > <s:Label text="hello world" fontSize="70" /> > > > </s:WindowedApplication> > > > > airtest-app.xml , descriptor.xml: > > > > <?xml version="1.0" encoding="utf-8" standalone="no"?> > > > <application xmlns="http://ns.adobe.com/air/application/2.6"> > > > <id>airtest</id> > > > <filename>airtest</filename> > > > <name>airtest</name> > > > <versionNumber>0.0.0</versionNumber> > > > <initialWindow> > > > <content>[This value will be overwritten by Flash Builder > > in the > > > output app.xml]</content> > > > <autoOrients>false</autoOrients> > > > <fullScreen>false</fullScreen> > > > <visible>false</visible> > > > </initialWindow> > > > </application> > > > > Thank you for your view. > > > > MH > > > > On Nov 22, 7:27 am, "[email protected]" <[email protected]> wrote: > > > > > Please share your pom.xml and descriptor.xml so we can elaborate a bit. > > > > > -- > > > > Simon > > > > > -- > > > > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > > > > > gMale Another <[email protected]> wrote: > > > > > Hello, > > > > > This is my first post to this group. I was directed here by a commenter > > on my related StackOverflow question. I have Googled quite a bit and also > > searched through this group's history. I'm having the WORST time trying to > > solve this problem! > > > > > Problem: > > > > > I am compiling an AIR application with Flexmojos. It produces a > > functional SWF (located, after install, at: > > /Applications/MyApp.app/Contents/Resources/MyApp.swf) but it doesn't run. > > That is, when I click on the application, no window appears. I see my > > application name in the Mac OS title bar (the... > > > read more » -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
