Before you can apply Compatibility Package on your project, you have to prepare something first:
- First of all, make sure you have installed Compatibility Package:
In Eclipse, click Window -> Android SDK Manager, scroll down to Extras, install Android Compatibility package.
- Include Compatibility Package in your Build Path:
Right click on your project in Package Explorer, -> Properties.
Select Java Build Path tab on the left.
Click Add External JARS button on the right.
Browse to select your instaled android-support-v4.jar, and click OK.
Now you should have android-support-v4.jar in your Java Build Path, click OK.
updated@2011-12-27:
It's called Android Support Package now, in /android-sdks/extras/android/support/v4/android-support-v4.jar
next:
- Example of using Compatibility Package, implement Fragment on pre-Android 3.0 devices