sdk.dir missing in cordova / Phonegap

Today I face a strange problem while doing ‘ant clean’ after building the phonegap project.  The full error is as below.

\CordovaLib\build.xml:55: sdk.dir is missing. Make sure to generate using ‘android update project’ or to inject it through the ANDROID_HOME environment variable.

The problem is because the file inside the cordova library project is incomplete.  By default the file will contain the path for sdk.dir.  In my case the file was empty.  I just copied the from some other project and replaced here and the problem solved.

Leave a Reply

Your email address will not be published. Required fields are marked *