This repository has been archived by the owner. It is now read-only.

Unable to resolve superclass of Landroid/support/v4/app/Watson #857

Closed
linxingyun opened this Issue Mar 10, 2013 · 18 comments

Comments

Projects
None yet
@linxingyun
Copy link

linxingyun commented Mar 10, 2013

Hello,

When use this lib in my project, I am getting following error message. Could anyone tell me how to resolve it? Thanks a lot!

03-11 02:12:59.284: W/dalvikvm(1085): Unable to resolve superclass of Landroid/support/v4/app/Watson; (149)
03-11 02:12:59.284: W/dalvikvm(1085): Link of class 'Landroid/support/v4/app/Watson;' failed
03-11 02:12:59.284: W/dalvikvm(1085): Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockFragmentActivity; (161)

@JakeWharton

This comment has been minimized.

Copy link
Owner

JakeWharton commented Mar 10, 2013

This means the support library wasn't included in your app somehow. Watson extends from FragmentActivity so you need to make sure the android-support-v4.jar is included in your app.

@SimonVT SimonVT closed this Mar 10, 2013

@linxingyun

This comment has been minimized.

Copy link

linxingyun commented Mar 11, 2013

Great! Thanks a lot for the help!

@KonstantinEfimenko

This comment has been minimized.

Copy link

KonstantinEfimenko commented May 18, 2013

Hi! But I have same problem. It worked fine until yestarday, when I updated sdk. Now my project compiles, but when it start, I get this errors:

05-18 16:20:43.478: W/dalvikvm(15143): Unable to resolve superclass of Landroid/support/v4/app/Watson; (111)
05-18 16:20:43.478: W/dalvikvm(15143): Link of class 'Landroid/support/v4/app/Watson;' failed
05-18 16:20:43.478: W/dalvikvm(15143): Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockFragmentActivity; (119)
05-18 16:20:43.478: W/dalvikvm(15143): Link of class 'Lcom/actionbarsherlock/app/SherlockFragmentActivity;' failed
05-18 16:20:43.478: W/dalvikvm(15143): Unable to resolve superclass of Lua/privatbank/gps/android/view/outlays/OutlaysListActivity; (277)
05-18 16:20:43.478: W/dalvikvm(15143): Link of class 'Lua/privatbank/gps/android/view/outlays/OutlaysListActivity;' failed
05-18 16:20:43.478: E/dalvikvm(15143): Could not find class 'ua.privatbank.gps.android.view.outlays.OutlaysListActivity', referenced from method ua.privatbank.gps.android.view.MainActivity.onClick
05-18 16:20:43.478: W/dalvikvm(15143): VFY: unable to resolve const-class 754 (Lua/privatbank/gps/android/view/outlays/OutlaysListActivity;) in Lua/privatbank/gps/android/view/MainActivity;
05-18 16:20:43.478: D/dalvikvm(15143): VFY: replacing opcode 0x1c at 0x000a

What else? I have another small project with just one SherlockActivity and one SherlockListActivity, and this project works fine.
I tried to create another workspace and restore code in another IDE - same effect.
I use ActionBarSherlock like progect.

@Tolriq

This comment has been minimized.

Copy link

Tolriq commented May 18, 2013

Because the SDK 22 is now more smart about library dependency :)

With the side effect that now when you compile external library of your libraries are no more automatically embed in the final APK.

You just need to copy your libraries external JARs to your main application libs :)

@xiegeo

This comment has been minimized.

Copy link

xiegeo commented May 19, 2013

Real smart.
For me I also had to include libs, which now appears under 'Android Private Libraries', in export.

http://code.google.com/p/android/issues/detail?id=55304

Nikolay's workaround works for me:
For all projects (app and library):

  1. Right click the project, and choose Properties
  2. Go to Java Build Path-Order and Export.
  3. Tick 'Android Private Libraries'
@KonstantinEfimenko

This comment has been minimized.

Copy link

KonstantinEfimenko commented May 20, 2013

xiegeo, thank You. It works.

@kutothe

This comment has been minimized.

Copy link

kutothe commented May 20, 2013

This was driving me mad, thank you xiegeo.

@jasonhaihuang

This comment has been minimized.

Copy link

jasonhaihuang commented May 21, 2013

Thank you Tolriq, your solution helped me fix my issue, which came up recently after I upgraded my SDK to version 22.
Thank you so much!

@Cealtea

This comment has been minimized.

Copy link

Cealtea commented May 21, 2013

It works now. Thanks a lot. This was driving me mad too :)

@fabiancz

This comment has been minimized.

Copy link

fabiancz commented May 24, 2013

Thanks Xiengeo for help. I needed to reorder "Android Private Libraries" to first position, to get it working.

@Felixomni

This comment has been minimized.

Copy link

Felixomni commented May 24, 2013

God bless you, Xiegeo.

@DicksonGT

This comment has been minimized.

Copy link

DicksonGT commented May 28, 2013

Thank you, Xiegeo!
Interestingly its a warning, not an error, ignored for a while until I spent hours...
//Remember to clean all libs and projects

@dauglus

This comment has been minimized.

Copy link

dauglus commented May 29, 2013

Thanks, Xiegeo!

@daimajia

This comment has been minimized.

Copy link

daimajia commented Jun 5, 2013

Thanks, Xiegeo and Tolriq !!

@jayhilwig

This comment has been minimized.

Copy link

jayhilwig commented Jun 14, 2013

Xiego/Nikolay solution worked for me as well, thanks.

Oddly, my project would run when built from my Mac but not from Eclipse on my Win7 box.

@allenmanning

This comment has been minimized.

Copy link

allenmanning commented Jul 12, 2013

Xiego/Nikolay - thank you!

@Dellaso

This comment has been minimized.

Copy link

Dellaso commented Apr 16, 2014

thanks, xiegeo!

@NagaMalleshM

This comment has been minimized.

Copy link

NagaMalleshM commented Jun 14, 2016

How to do this in Android Studio on Mac? I dont find a option to tick 'Android Private Libraries'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.