首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复flexmojos:找不到类型- UncaughtErrorEvent (Flex4.1)

如何修复flexmojos:找不到类型- UncaughtErrorEvent (Flex4.1)
EN

Stack Overflow用户
提问于 2011-04-28 23:23:57
回答 2查看 1.4K关注 0票数 1

我使用的是flexmojos 3.8和flex编译器4.1.0.16248

我的项目在Flash Builder中编译得很好,但在使用flexmojos / maven时,我得到了以下错误:

代码语言:javascript
复制
Type was not found or was not a compile-time constant: UncaughtErrorEvent

Flex代码如下所示:

代码语言:javascript
复制
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);

Flex Compiler4.1应该知道UncaughtErrorEvent类型--为什么它会失败?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-04-29 16:39:57

找到解决方案:

flexmojos mailing list

代码语言:javascript
复制
<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> 
票数 1
EN

Stack Overflow用户

发布于 2011-04-28 23:29:13

您需要以flash player 10.1为目标,而不是10.0

不确定如何在Maven中做到这一点,但这可能是您的问题所在。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5821019

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档