我對螞蟻有問題。我喜歡在螞蟻中使用條件。但我得到的錯誤:螞蟻條件問題
BUILD FAILED
C:\Projekti\Projekt ANT\build.xml:412: Problem: failed to create task or type
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
,這是代碼:
<target name="test">
<input message="Write some text: " addproperty="foo" />
<if>
<equals arg1="${foo}" arg2="bar" />
<then>
<echo message="The value of property foo is 'bar'" />
</then>
<elseif>
<equals arg1="${foo}" arg2="foo" />
<then>
<echo message="The value of property foo is 'foo'" />
</then>
</elseif>
<else>
<echo message="The value of property foo is not 'foo' or 'bar'" />
</else>
</if>
</target>
</project>
你剛剛用**圖片**代替了你的代碼嗎?現在你如何期待有人來測試呢? – 2010-05-12 13:36:12
yes becouse我無法添加代碼。如果我複製代碼沒有代碼顯示在計算器中。 – senzacionale 2010-05-12 17:59:29
這隻意味着你沒有正確添加它。選擇代碼,然後按Ctrl-K或單擊代碼圖標以正確格式化。 – 2010-05-12 18:05:54