Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred after update the Android SDK Tool REV 22 "Unable to resolve superclass of L"

The project is good yesterday, but when I update Sdk tools and ADT today(REV 22), the error occurred like "Unable to resolve superclass of L..." when I run the project.

My project uses ActionbarSherlock and SlidingMenu.

I have already tried:

  1. Copy external jars to my project's "libs" folder. (I have already do this before)
  2. Properties->Java Build Path->Projects and add the library project there.
  3. clean and rebuild
  4. reset the computer or IDE
  5. Try other project which also contains project lib
  6. Follow Class not found error after updating ADT and Android sdk tools to latest ver 22

But they are all failed.

The whole Logcat is below:

05-17 06:53:50.087: E/Trace(949): error opening trace file: No such file or directory (2)
05-17 06:53:50.188: W/dalvikvm(949): Unable to resolve superclass of Lcom/qdnews/utils/AsyncImageLoaderX$1; (50)
05-17 06:53:50.197: W/dalvikvm(949): Link of class 'Lcom/qdnews/utils/AsyncImageLoaderX$1;' failed
05-17 06:53:50.197: E/dalvikvm(949): Could not find class 'com.qdnews.utils.AsyncImageLoaderX$1', referenced from method com.qdnews.utils.AsyncImageLoaderX.<init>
05-17 06:53:50.207: W/dalvikvm(949): VFY: unable to resolve new-instance 177 (Lcom/qdnews/utils/AsyncImageLoaderX$1;) in Lcom/qdnews/utils/AsyncImageLoaderX;
05-17 06:53:50.207: D/dalvikvm(949): VFY: replacing opcode 0x22 at 0x001b
05-17 06:53:50.207: I/dalvikvm(949): Could not find method android.support.v4.util.LruCache.put, referenced from method com.qdnews.utils.AsyncImageLoaderX.addBitmapToCache
05-17 06:53:50.207: W/dalvikvm(949): VFY: unable to resolve virtual method 112: Landroid/support/v4/util/LruCache;.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
05-17 06:53:50.217: D/dalvikvm(949): VFY: replacing opcode 0x6e at 0x0007
05-17 06:53:50.237: I/dalvikvm(949): Could not find method android.support.v4.util.LruCache.get, referenced from method com.qdnews.utils.AsyncImageLoaderX.getBitmapFromCache
05-17 06:53:50.237: W/dalvikvm(949): VFY: unable to resolve virtual method 111: Landroid/support/v4/util/LruCache;.get (Ljava/lang/Object;)Ljava/lang/Object;
05-17 06:53:50.237: D/dalvikvm(949): VFY: replacing opcode 0x6e at 0x0005
05-17 06:53:50.257: W/dalvikvm(949): Unable to resolve superclass of Lcom/qdnews/utils/AsyncImageLoaderX$1; (50)
05-17 06:53:50.257: W/dalvikvm(949): Link of class 'Lcom/qdnews/utils/AsyncImageLoaderX$1;' failed
05-17 06:53:50.267: D/dalvikvm(949): DexOpt: unable to opt direct call 0x025a at 0x1d in Lcom/qdnews/utils/AsyncImageLoaderX;.<init>
05-17 06:53:50.277: D/AndroidRuntime(949): Shutting down VM
like image 964
Marshal Chen Avatar asked May 17 '13 07:05

Marshal Chen


2 Answers

With rev 22, they added "Android Private Libraries".

For every related Project (including the actionbarsherlock project), right click it -> Properties -> Java Build Path -> Order and Export -> Check Android Private Libraries

like image 169
danijoo Avatar answered Nov 15 '22 16:11

danijoo


Besides adding Android Private Libraries, that should be also related to the target SDK version.

Try set 'android:targetSdkVersion="17"' in the manifest XML, this solve my build problem recently after updating the SDK

like image 23
Always A Developer Avatar answered Nov 15 '22 15:11

Always A Developer