android - "Failed to inflate" ActionbarSherlock and ViewPager Indicator -


i have app using viewpager , viewpagerindicator , reason keep getting following error below. cant seem figure out why error populating. greately appreciated. based on stack trace believe issue main.xml on line viewpager starts, there nothing havnt done before. maybe coming librarys side?

 e/activitythread(1220): failed inflate  e/activitythread(1220): android.view.inflateexception: binary xml file line #29: error inflating class com.viewpagerindicator.titlepageindicator  e/activitythread(1220):    @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:698)  e/activitythread(1220):    @ android.view.layoutinflater.rinflate(layoutinflater.java:746)  e/activitythread(1220):    @ android.view.layoutinflater.inflate(layoutinflater.java:489)  e/activitythread(1220):    @      android.view.layoutinflater.inflate(layoutinflater.java:396)  e/activitythread(1220):    @ android.view.layoutinflater.inflate(layoutinflater.java:352)  e/activitythread(1220):    @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:323)  e/activitythread(1220):    @ com.actionbarsherlock.internal.actionbarsherlocknative.setcontentview(actionbarsherlocknative.java:134)  e/activitythread(1220):    @ com.actionbarsherlock.app.sherlockactivity.setcontentview(sherlockactivity.java:229)  e/activitythread(1220):    @ com.jaisonbrooks.enlighten.mainactivityviewpager.oncreate(mainactivityviewpager.java:63)  e/activitythread(1220):    @ android.app.activity.performcreate(activity.java:5104)  e/activitythread(1220):    @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1080)  e/activitythread(1220):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2261)  e/activitythread(1220):    @ android.app.activitythread.handlelaunchactivity(activitythread.java:2357)  e/activitythread(1220):    @ android.app.activitythread.access$600(activitythread.java:153)  e/activitythread(1220):    @ android.app.activitythread$h.handlemessage(activitythread.java:1247)  e/activitythread(1220):    @ android.os.handler.dispatchmessage(handler.java:99)  e/activitythread(1220):    @ android.os.looper.loop(looper.java:137)  e/activitythread(1220):    @ android.app.activitythread.main(activitythread.java:5226)  e/activitythread(1220):    @ java.lang.reflect.method.invokenative(native method)  e/activitythread(1220):    @      java.lang.reflect.method.invoke(method.java:511)  /activitythread(1220):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:795)  e/activitythread(1220):    @ com.android.internal.os.zygoteinit.main(zygoteinit.java:562)  e/activitythread(1220):    @ dalvik.system.nativestart.main(native method)  e/activitythread(1220): caused by: java.lang.classnotfoundexception: didn't find class "com.viewpagerindicator.titlepageindicator" on path: /data/app/com.jaisonbrooks.enlighten-1.apk  e/activitythread(1220):    @ dalvik.system.basedexclassloader.findclass(basedexclassloader.java:65)  e/activitythread(1220):    @ java.lang.classloader.loadclass(classloader.java:501)  e/activitythread(1220):    @ java.lang.classloader.loadclass(classloader.java:461)  e/activitythread(1220):    @ android.view.layoutinflater.createview(layoutinflater.java:552)  e/activitythread(1220):    @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:687) 

code

 public class mainactivityviewpager extends sherlockactivity {  private viewpager awesomepager; private static int num_awesome_views = 3; private context context; private awesomepageradapter awesomeadapter; layoutinflater inflater; progressbar progressbar;  public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     com.actionbarsherlock.app.actionbar actionbar =             .getsupportactionbar();     actionbar.setdisplayhomeasupenabled(false);     actionbar.setdisplayshowtitleenabled(false);     actionbar.setdisplayshowhomeenabled(true);     setcontentview(r.layout.main);     getsupportactionbar().show();     context = this;     inflater = (layoutinflater) context.getsystemservice(context.layout_inflater_service);     awesomeadapter = new awesomepageradapter();     awesomepager = (viewpager) findviewbyid(r.id.pager);     awesomepager.setoffscreenpagelimit(3);     awesomepager.setadapter(awesomeadapter);     titlepageindicator awesomeindicator = (titlepageindicator) findviewbyid(r.id.indicator);     awesomepager.setadapter(awesomeadapter);     awesomeindicator.setviewpager(awesomepager);  } 

main.xml

  <?xml version="1.0" encoding="utf-8"?>  <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"   xmlns:app="http://schemas.android.com/apk/res-auto"   android:layout_width="fill_parent"   android:layout_height="fill_parent"   android:orientation="vertical" >  <com.viewpagerindicator.titlepageindicator     android:id="@+id/indicator"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:background="#18ff0000"     android:padding="10dip"     android:textcolor="#aa000000"     app:footercolor="#ffaa2222"     app:footerindicatorheight="3dp"     app:footerindicatorstyle="underline"     app:footerlineheight="1dp"     app:selectedbold="true"     app:selectedcolor="#ff000000" />  <android.support.v4.view.viewpager     android:id="@+id/pager"     android:layout_width="match_parent"     android:layout_height="match_parent" > </android.support.v4.view.viewpager> 

sherlockfragmentactivity should used when working fragments


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -