0

Often the issue when inflating a fragment in API 8 - 10 is that the API 11+ import is used instead of utilizing the Android Support V4 import.

In my case, I'm utilizing a SherlockListFragment that my class extends. It's my understanding that ABS (Action Bar Sherlock) includes the V4 support library, and therefore, you simply import ABS and it should be backwards compatible to API 8 - 10.

I have found however that I continually get an "Error Inflating Class Fragment" on API 8 - 10, when the app works flawlessly on API 11+ emulators and devices.

Is there an obvious explanation I might be overlooking here? Any ideas would be appreciated!

*EDIT: FIXED - the Error Inflating Class Fragment was caused by a NullPointerException, this was not the main error, but a secondary cause of the null value. Oops.

AutoM8R
  • 3,020
  • 3
  • 32
  • 52
  • what type of error you have.. – Ranjit Jan 31 '14 at 03:24
  • Ok, I figured it out. I neglected to notice that the main cause was not the "Error Inflating Class Fragment", but that this was a secondary cause of a different error. I went down the LogCat and found the actual error, which was a NullPointerException. I fixed the null value and it's working fine. – AutoM8R Jan 31 '14 at 04:03

0 Answers0