If I run ant release in the shell in my dir proj it works fine, however, when I try to execute it from python, it fails, why?
/Users/hunterp/proj
Buildfile: /Users/hunterp/proj/build.xml
BUILD FAILED
/Users/hunterp/proj/build.xml:46: sdk.dir is missing. Make sure to generate local.properties using 'android update project'
It is difficult to answer this question without more information about your setup or the code you are using. Particularly the parts that are generating the error since we don’t know what your code looks like (either in build.xml or in your python script).
An easy thing to start with, as indicated by @Mark, is to
<echo>${basedir}</echo>in yourreleasetask to see where exactly it thinks it is running from. My guess is that you are trying to load a properties file or some such and it isn’t finding it in an earlier step.What you can do if the location of
${basedir}looks different when run from within the directory versus within your python script is use a reference to where your build.xml file lives and reference from there:Then use use
${project.basedir}instead of${basedir}.All of this assuming, of course, that your
${basedir}appears differently between the two. Otherwise I’d need to know more in order to diagnose the issue.