Ant使用-source 7或更高版本来启用钻石操作员 [英] Ant use -source 7 or higher to enable diamond operator

查看:179
本文介绍了Ant使用-source 7或更高版本来启用钻石操作员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确信这很简单,但我仍然坚持使用命令行中的Ant构建Android应用程序。
我收到此消息:(使用-source 7或更高版本启用钻石操作员)。我将什么添加到构建文件以使其使用Java 1.7进行编译?

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 diamond operator). What do I add to buildfile to make it compile using Java 1.7?

推荐答案

解决了它,如果其他人被困在这个上。
我必须更改< import file =$ {sdk.dir} /tools/ant/build.xml/> 文件。
有属性
< property name =java.targetvalue =1.5/> < property name =java.sourcevalue =1.5/> ,值应更改为1.7

Solved it if anyone else is stuck on this one. I had to change <import file="${sdk.dir}/tools/ant/build.xml"/> file. There are properties <property name="java.target" value="1.5" /> <property name="java.source" value="1.5" /> and the values should be changed to 1.7

这篇关于Ant使用-source 7或更高版本来启用钻石操作员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆