Wednesday, December 9, 2009

sdk.dir versus sdk-location

When something is simple to do I like to just do it - instead of using an obscure wrapper. So I'm inclined to to run a tool like 'android update' to update a project and then do a diff on the old version of the project to see what it does. Well, all android update does in this case is make some simple changes in local.properties and default.properties. Knowing this I prefer to edit these files myself instead of running android update.

I was updating all my android projects from SDK 1.5 to 2.01 (yes I have neglected them for a while).

I ran into a problem.

In local.properties the SDK location used to be stowed in sdk-location. It is now in sdk.dir.

So simply updating local.properties
from
sdk-location=blah blah/android-sdk-linux_x86-1.5_r1
to
sdk-location=blah blah/android-sdk-linux_x86-r04

DOES NOT WORK.

It took me a few minutes to figure out the problem. Perhaps someone else will encounter the same issue and I hope this helps. You simply need use sdk.dir in your location.properties file.

sdk.dir=blah blah/android-sdk-linux_x86-r04

Oh, and don't forget to check you other build files and replace sdk-location with
sdk.dir.

No comments:

Post a Comment