Sunday, December 18, 2011

Install and setup Compatibility Package


It seem no longer work!

Refer to another post: to know how to add Android Support Package.

Compatibility Package is a static library that exposes the same Fragments API from Android 3.0, so that applications compatible with Android 1.6 or later can use fragments to create tablet-compatible user interfaces.

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.
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.
Add android-support-v4.jar

Now you should have android-support-v4.jar in your Java Build Path, click OK.
Java Build Path


It's called Android Support Package now, in /android-sdks/extras/android/support/v4/android-support-v4.jar
Android Support Package

- Example of using Compatibility Package, implement Fragment on pre-Android 3.0 devices

1 comment:

Wim Rijnders said...

And now it's called: 'Android Support Library'.