I copied build.xml from a sample (specifically tutorial-2-opencvcamera), only changing the project name to "opencv". I also created local.properties in that directory with sdk.dir set to my SDK location. After that it worked fine