我使用的是flexmojos 3.8和flex编译器4.1.0.16248
我的项目在Flash Builder中编译得很好,但在使用flexmojos / maven时,我得到了以下错误:
Type was not found or was not a compile-time constant: UncaughtErrorEventFlex代码如下所示:
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);Flex Compiler4.1应该知道UncaughtErrorEvent类型--为什么它会失败?
发布于 2011-04-29 16:39:57
找到解决方案:
flexmojos mailing list
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.version}</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flex.version}</version>
<classifier>10.1</classifier>
<type>swc</type>
</dependency>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
...
<targetPlayer>10.1</targetPlayer>
...
</configuration>
</plugin> 发布于 2011-04-28 23:29:13
您需要以flash player 10.1为目标,而不是10.0
不确定如何在Maven中做到这一点,但这可能是您的问题所在。
https://stackoverflow.com/questions/5821019
复制相似问题