-1

I have tried to debug this, but cannot figure out why it isn't working.

This is the logcat output:

05-25 17:28:39.251: E/AndroidRuntime(1008): FATAL EXCEPTION: main
05-25 17:28:39.251: E/AndroidRuntime(1008): java.lang.NoClassDefFoundError: com.actionbarsherlock.widget.SuggestionsAdapter
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.actionbarsherlock.widget.SearchView.updateSearchAutoComplete(SearchView.java:1132)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.actionbarsherlock.widget.SearchView.setSearchableInfo(SearchView.java:370)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.liamwli.spotify.spotifycommunity.MainActivity.onCreateOptionsMenu(MainActivity.java:153)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.actionbarsherlock.app.SherlockActivity.onCreatePanelMenu(SherlockActivity.java:184)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.actionbarsherlock.ActionBarSherlock.callbackCreateOptionsMenu(ActionBarSherlock.java:559)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.actionbarsherlock.internal.ActionBarSherlockNative.dispatchCreateOptionsMenu(ActionBarSherlockNative.java:65)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.actionbarsherlock.app.SherlockActivity.onCreateOptionsMenu(SherlockActivity.java:149)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.app.Activity.onCreatePanelMenu(Activity.java:2498)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:407)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:769)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:201)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.view.Choreographer.doCallbacks(Choreographer.java:562)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.view.Choreographer.doFrame(Choreographer.java:531)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.os.Handler.handleCallback(Handler.java:725)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.os.Handler.dispatchMessage(Handler.java:92)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.os.Looper.loop(Looper.java:137)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at android.app.ActivityThread.main(ActivityThread.java:5229)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at java.lang.reflect.Method.invokeNative(Native Method)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at java.lang.reflect.Method.invoke(Method.java:525)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
05-25 17:28:39.251: E/AndroidRuntime(1008):     at dalvik.system.NativeStart.main(Native Method)

I tried disabling proguard, in case that was the issue, but no luck.

Line 153 of my class is:

searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));

Could anyone assist in this issue?

Liam W
  • 1,193
  • 1
  • 26
  • 46
  • if you have updated adt to rev 22 check this http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127 – Raghunandan May 25 '13 at 16:40
  • may this [link](http://stackoverflow.com/questions/11443262/actionbarsherlock-java-lang-noclassdeffounderror-com-actionbarsherlock-rstyle) helps you – Oli May 25 '13 at 16:41
  • I'm not using rev 22 @Raghunandan – Liam W May 25 '13 at 16:46

2 Answers2

0

You could try the solution given on following links questions answer java.lang.ClassNotFoundException after changing nothing in the project but upgrading eclipse android sdk

Community
  • 1
  • 1
Osama Mohammed Shaikh
  • 1,219
  • 1
  • 16
  • 40
  • 1
    I didn't see it before posting. – Osama Mohammed Shaikh May 25 '13 at 16:43
  • It is added as a library - there is nowhere to select to export it with the project. – Liam W May 25 '13 at 16:45
  • @LiamW do you refer the library project or did you add the jar to the /libs folder? – Raghunandan May 25 '13 at 16:46
  • @Raghunandan, what do you mean? I added the library project in the Android section of the preferences in eclipse. I didn't use a jar file. – Liam W May 25 '13 at 16:49
  • @LiamW did you right click on your project goto java build path choose android click add. browse the library project and add it. Did you do it this way is what i meant? – Raghunandan May 25 '13 at 16:51
  • The answer says that you need to go to package explorer. After going to package explorer you need to right click your project & goto properties. After going to properties, goto Java Build Path. In Java Build Path goto Order and Export tab & select everything you can. If this solves the problem then well & good else please try something else. – Osama Mohammed Shaikh May 25 '13 at 16:53
0

Updating the support library and tools package, and then deleting the support library jar file in the libs folder fixed this for me.

Liam W
  • 1,193
  • 1
  • 26
  • 46