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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
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.7Just to clarify, I changed my
ant.properties
as follows:Making changes in build.xml before the above suggested line didn't work for me for some reason.
Heisenberg's solution is correct (kudos and +1...) but not clean: you don't have to change the master
build.xml
file (bad!), what you need is to add the lines he suggested:right before the line
in the local
build.xml
file, and the default options will be overridden.Hope it helps!
You need to set
java.source
andjava.target
. Either via-D
:Or put it in
ant.properties
in your project: