SDK.DIR is missing? android update project?

Code Droid picture Code Droid · Sep 4, 2012 · Viewed 59.6k times · Source

I get this error when I do

$ ant release
sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var

typing in android update project I get another error saying I must specify the path .... to the project.

Then I try cd into the directory of my project and do

android update -p .
android update -path . 

etc and it says -p and -path are not globally recognized.

Could someone just give me the exact syntax?

Answer

Code Droid picture Code Droid · Sep 6, 2012

cd to project directory and execute the following: The word project is part of the command, and is not to be replaced with an actual project name. The documentation does not make this clear and should be improved.

   android update project -p .