android - SlidingMenu - RuntimeException -


i following [this tutorial][1], has 2 parts. followed part 1 , ran app, worked perfectly. followed part 2 , keep getting runtimeexception

09-03 18:32:29.339: e/androidruntime(21044): java.lang.runtimeexception: unable start activity componentinfo{com.tvgenius/com.tvgenius.mainactivity}: android.view.inflateexception: binary xml file line #2: error inflating class fragment 09-03 18:32:29.339: e/androidruntime(21044):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2100) 09-03 18:32:29.339: e/androidruntime(21044):    @ android.app.activitythread.handlelaunchactivity(activitythread.java:2125) 

i followed tutorial exactly. don't know i'm missing...

solution: minsdkversion fragments required 12, mine 11.

to use fragments need minimum sdk version 12 or have download support library.

just right click on project->android tools -> add support library...

instead of:

import android.app.fragment; 

you have use:

import android.support.v4.app.fragment; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -