Question: I am writing an app for android which uses Fragments, but when I run the application on a GingerBread phone, I get an error in this line:

```
inflater.inflate(R.layout.fragment_location, container, false);

```

which says

```
android.view.InflateException: Binary XML file line #8: Error inflating class <unknown>

```

everything is supposedly good, the MainActivity extends FragmentActivity, The ViewPager, the FragmentPagerAdapter and the Fragment are all from the support package. so what am I doing wrong?

Answer: 
as others have mentioned, Fragments aren't supported on pre-honeycomb versions of Android, so you will need to use a library for this.

Google has one, and there is also a very popular library called [**ActionBarSherlock**](http://actionbarsherlock.com/download.html) , which also has examples of how to use them.

i think the best way to learn how to use them is read the samples code. it's not so hard.
`Fragment` is introduced in `API level 11 (Honeycomb)`. So if you want to use `Fragments` flexibly in below `AIP level 11` you should use library like `ABS (ActionBarSherlock)` you can get it from github(<https://github.com/JakeWharton/ActionBarSherlock>). Better use that.