从Adobe的documentation:使用mxmlc(Flex编译器)会忽略XML CONFIGS“定义”
To set the value of these constants in the flex-config.xml file, rather than on the command line, you write this as the following example shows:
<compiler>
<define append="true">
<name>CONFIG::debugging</name>
<value>true</value>
</define>
<define append="true">
<name>CONFIG::release</name>
<value>false</value>
</define>
</compiler>
的问题是,编译器实际上并不考虑这些,给我像“错误编译错误:访问未定义的属性调试。“因为我在我的ActionScript代码中有这个。
如果我通过参数(“-define + = CONFIG :: debugging,true”)来定义它们,一切正常。
我想也许我的配置根本没有使用,所以我格式不正确 - mxmlc指出。所以config实际上被加载到编译器中。
任何提示?谢谢。
是的,我知道引用字符串的问题(在我的经验中有相同的),但你的例子是布尔值,所以我不认为它是一个潜在的原因) – fsbmain 2013-02-20 11:20:05
并给我自己的一个说明:张贴实际的东西,做不过分简化=) – 2013-02-20 12:04:12