1、问题分析:
windows下的flex+java项目移植到Mac环境报错,如标题所示:意思是找不到引号路径下的文件。显然在Mac环境下路径分隔符是/,但是我们可以看到路径中前半部分为/,后面却是\,所以错误之处是:在取services-config.xml路径的后面设置错了。该设置的位置在:项目工作空间下的一级目录:比如,我的项目名为csgsim,那么csgsim文件夹下面就有.actionScriptProperties文件。注意:该文件在Mac环境下是以隐藏方式出现的,但是Mac可以自己设置是否显示隐藏文件,这一点可以百度。此时已经找到问题所在,接下来就是更改.actionScriptProperties下路径的配置。
2、actionScriptProperties原内容为:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="main.mxml" projectUUID="5ecef193-e868-4a4e-9d16-688fbaffe5ce" version="10">
<compiler additionalCompilerArguments="-services "${user.dir}\..\WebRoot\WEB-INF\flex\services-config.xml" -locale en_US --target-player=10.0.0" autoRSLOrdering="false" copyDependentFiles="true" flexSDK="Flex 3.5" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="WebRoot" removeUnusedRSL="true" rootURL="" sourceFolderPath="flex_src" strict="true" targetPlayerVersion="9.0.124" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="flex_libs"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications>
<application path="main.mxml"/>
<application path="sourceCode/ocableTopo/views/BusinessInfluencedForTmis.mxml"/>
<application path="index.mxml"/>
<application path="indextest.mxml"/>
<application path="sourceCode/businessDispatch/view/CircuitInfo.mxml"/>
<application path="select_module.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
<flashCatalyst validateFlashCatalystCompatibility="false"/>
</actionScriptProperties>
仅仅需要修改第4行内容即可。
actionScriptProperties修改如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="main.mxml" projectUUID="5ecef193-e868-4a4e-9d16-688fbaffe5ce" version="10">
<compiler additionalCompilerArguments="-services "${user.dir}/../WebRoot/WEB-INF/flex/services-config.xml" -locale en_US --target-player=10.0.0" autoRSLOrdering="false" copyDependentFiles="true" flexSDK="Flex 3.5" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="WebRoot" removeUnusedRSL="true" rootURL="" sourceFolderPath="flex_src" strict="true" targetPlayerVersion="9.0.124" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="flex_libs"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications>
<application path="main.mxml"/>
<application path="sourceCode/ocableTopo/views/BusinessInfluencedForTmis.mxml"/>
<application path="index.mxml"/>
<application path="indextest.mxml"/>
<application path="sourceCode/businessDispatch/view/CircuitInfo.mxml"/>
<application path="select_module.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
<flashCatalyst validateFlashCatalystCompatibility="false"/>
</actionScriptProperties>
4、在flash builder里面重新clean一下项目,问题解决。