Looking at the example code in the docs http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir%28java.lang.String%29
File path = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
It does not compile on 2.1
The static fields DIRECTORY_PICTURES, DIRECTORY_MUSIC etc. don’t seem to be found.
Update:
Using the filter api checkbox, I see that it was removed in Android 2.2 (or api version 8). So the manifest file needs to contain minSdk defined as 7.
That’s because this was added in Android 2.2 (API Level 8). See “Filter by API Level” in top right corner.