How do I fix 'Unexpected element “{}target” {antlib:org.apache.tools.ant}target' errors in my Ant build?

前端 未结 2 1732
夕颜
夕颜 2021-02-04 05:02

When I run my Ant build it fails with the following exception:

Unexpected element \"{}target\" {antlib:org.apache.tools.ant}target

I\'m using E

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 05:45

    Surprinsingly, the apache foundation doesn't clearly express the namespace in which ant scripts are to be written. Yet it's an important XML concept...

    However, the error message you get shows this namespace URI: antlib:org.apache.tools.ant

    Although most of the time you don't need to bound the default namespace, this may help in your case:

    
      
    
    

提交回复
热议问题