Ant use -source 7 or higher to enable diamond operator

前端 未结 4 1991
情书的邮戳
情书的邮戳 2021-02-05 09:11

I am sure this is pretty easy qoestion, but I am stuck with building Android app using Ant from commandline. I have got this message: (use -source 7 or higher to enable d

4条回答
  •  余生分开走
    2021-02-05 09:49

    You need to set java.source and java.target. Either via -D:

    ant release -Djava.source=7 -Djava.target=7
    

    Or put it in ant.properties in your project:

    # ant.properies contents:
    java.source=7
    java.target=7
    

提交回复
热议问题