Get “Error: unable to resolve '/assets/images/**.png' for transcoding” while building on FlexMojos 4.0-RC2 and Flex SDK 4.5.1.21328

懵懂的女人 提交于 2019-12-11 02:14:24

问题


I get the this "Error: unable to resolve '/assets/images/**.png' for transcoding" while building on FlexMojos 4.0-RC2 and Flex SDK 4.5.1.21328. Code is like below

 [Embed(source='/assets/images/lot_dimensions_bg_4digit.png')]

SDK version

<flex.sdk.version>4.5.1.21328</flex.sdk.version>

Flex Mojos version

<flex-mojos.version>4.0-beta-7</flex-mojos.version>

Thanks for any help.


回答1:


You need to specifically add a dependency for flexmojos-threadlocaltoolkit-wrapper before the compiler dependency.

See the following page for more details: https://dev.c-ware.de/confluence/display/PUBLIC/Configuring+your+poms




回答2:


I'm using the same version of the Flex SDK, but I'm using flexmojos 4.0-RC2. Embedded assets are working fine for me.

Make sure that when you build, you're copying the embedded assets over into target/classes. I had to include some special configuration for that.

<plugin>
    <groupId>org.sonatype.flexmojos</groupId>
    <artifactId>flexmojos-maven-plugin</artifactId>
    <version>${flexmojos.version}</version>
    <extensions>true</extensions>
    <configuration>
        <debug>true</debug>
        <configurationReport>true</configurationReport>
        <sourceFile>com/example/MyApp.mxml</sourceFile>
        <swfVersion>11</swfVersion>
        <flexBuilderCompatibility>true</flexBuilderCompatibility>
        <descriptorTemplate>${basedir}/${application.name}-app.xml</descriptorTemplate>

        <!-- Here's the extra config -->
        <includeFileSets>
            <fileset>
                <directory>src/main/resources/embedded</directory>
                <includes>
                    <include>*.*</include>
                </includes>
            </fileset>
        </includeFileSets>
    </configuration>
</plugin>


来源:https://stackoverflow.com/questions/7736297/get-error-unable-to-resolve-assets-images-png-for-transcoding-while-bui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!