從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