In my case, this was due to the fact that I did not have a default.properties file with a target field in it.
I had to manually create the file and put
target=android-9
Or another target version of Android.
If you run
ant -v
with your build team, you'll probably see this line
Property "target" has not been set
and
[property] Unable to find property file: /PATH_TO/default.properties
There are enough hints in these posts.
Hope this also solves your problem.
source share