如何修复 flexmojos:未找到类型 - UncaughtErrorEvent (Flex 4.1)

发布于 2024-11-04 08:44:43 字数 429 浏览 6 评论 0原文

我正在使用 Flexmojos 3.8 和 Flex 编译器 4.1.0.16248

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

Type was not found or was not a compile-time constant: UncaughtErrorEvent

Flex 代码如下所示:

loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);

Flex Compiler 4.1 应该知道类型 UncaughtErrorEvent - 为什么它失败了吗?

I'm using flexmojos 3.8 with flex compiler 4.1.0.16248

My Project compiles fine in Flash Builder, but with flexmojos / maven I get the following Error:

Type was not found or was not a compile-time constant: UncaughtErrorEvent

The Flex Code looks like this:

loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);

The Flex Compiler 4.1 should know the type UncaughtErrorEvent - Why does it fail?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

君勿笑 2024-11-11 08:44:44

找到了解决方案:

flexmojos 邮件列表

<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> 

Found the Solution:

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> 
烛影斜 2024-11-11 08:44:43

您需要将 Flash Player 定位到 10.1 而不是 10.0

不确定如何在 Maven 中执行此操作,但这可能是您的问题。

You'll need to target flash player 10.1 instead of 10.0

Not sure how to do it in Maven, but that's likely your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文