Using fragment tabs getting android.view.InflateException in Android 2.3.3

AlormEmbomO

New Member
Hello i am getting this exception while using Android 2.3.3:\[code\]android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>\[/code\]Exception fires in this method:(When creating Fragment)\[code\]public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { // We have different layouts, and in one of them this // fragment's containing frame doesn't exist. The fragment // may still be created from its saved state, but there is // no reason to try to create its view hierarchy because it // won't be displayed. Note this is not needed -- we could // just run the code below, where we would create and return // the view hierarchy; it would just never be used. return null; } try{ //exception here theLayout = (LinearLayout) inflater.inflate(R.layout.fragment1, container, false); }catch (Exception e) { // TODO: handle exception e.printStackTrace(); } return theLayout;}\[/code\]This happens when i go to Activity and return again to FragmentActivity and switch tabs.What i should do for this one ?Thanks.
 
Back
Top