开发者

How to fix flexmojos: Type was not found - UncaughtErrorEvent (Flex 4.1)

开发者 https://www.devze.com 2023-03-01 03:25 出处:网络
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:

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?


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.


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

精彩评论

暂无评论...
验证码 换一张
取 消