No such method error

292 views
Skip to first unread message

Paulo Fernandes

unread,
Jan 15, 2012, 3:55:20 PM1/15/12
to actionba...@googlegroups.com
Hi all,
i've been using actionbarsherlock for some time and in the most recent version of my app i started using tabs bellow the action bar, and i started to get some errors like this (after i put the new version in the market, i have never seen this error in my devices):

java.lang.NoSuchMethodError: com.pauloslf.cloudprint.CloudPrint.getSupportActionBar
at com.pauloslf.cloudprint.CloudPrint.onCreate(CloudPrint.java:192)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3647)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)


the Code that initiates the tabs is :

setContentView(R.layout.actionbar_tabs_pager);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); <----- failure is here 
ActionBar.Tab tab1 = getSupportActionBar().newTab().setText(
getString(R.string.menu_local));
ActionBar.Tab tab2 = getSupportActionBar().newTab().setText(
getString(R.string.menu_main));
ActionBar.Tab tab3 = getSupportActionBar().newTab().setText(
getString(R.string.menu_web));
mViewPager = (ViewPager) findViewById(R.id.pager);
mTabsAdapter = new TabsAdapter(this, getSupportActionBar(),
mViewPager);
mTabsAdapter.addTab(tab1, LocalMenuFragment.class);
mTabsAdapter.addTab(tab2, MainMenuFragment.class);
mTabsAdapter.addTab(tab3, WebMainMenuFragment.class);

if (savedInstanceState != null) {
        getSupportActionBar().setSelectedNavigationItem(savedInstanceState.getInt("indextab"));
} else {
getSupportActionBar().setSelectedNavigationItem(1);
}

I've tested the app in a few devices and i was never able to reproduce the problem, in the error reports i can't see the device so i really don't know what is causing it..

Any idea?

thanks in advance,
Paulo f


Jake Wharton

unread,
Jan 16, 2012, 1:52:28 PM1/16/12
to actionba...@googlegroups.com
That is... extremely odd. If you are extending FragmentActivity from the library how could getSupportActionBar not exist? Is there any pattern to the errors? This should be impossible.

---
Jake Wharton
http://about.me/jakewharton

Paulo Sergio

unread,
Jan 16, 2012, 1:57:56 PM1/16/12
to actionba...@googlegroups.com
Hi Jake,
i got 5 reports of this error in google developer console 15 minutes after i release the update, and until now (almost 24 hours later) i don't have any other report, so i don't think the issue is that bad, i really hope this was just one very unlucky user  reporting the same error 5 times :) ..
I agree this looks extremely odd, and if i get any more error reports i will let you know..

thanks for your support!

paulo f

Jonathan Steele

unread,
Jan 16, 2012, 2:23:38 PM1/16/12
to actionba...@googlegroups.com
I would like to have full stacktrace and source code of that file.

Paulo Sergio

unread,
Jan 16, 2012, 2:47:37 PM1/16/12
to actionba...@googlegroups.com
Hi Jonathan,
all i have is what was reported on the google admin console, it's in my first message..

paulo f
Reply all
Reply to author
Forward
0 new messages