新浪微博SDK引用时出现NoClassDefFoundError和VFY: unable to resolve static field 867....R$style错误
2012-10-16 18:36
507 查看
10-16 10:13:46.039: W/dalvikvm(717): VFY: unable to resolve static field 867 (ContentOverlay) in Lcom/weibo/android/R$style;
我将com_weibo_android.jar添加到libs文件下仍然出错:
10-16 10:13:46.039: W/dalvikvm(717): VFY: unable to resolve static field 867 (ContentOverlay) in Lcom/weibo/android/R$style;
10-16 10:13:46.039: D/dalvikvm(717): VFY: replacing opcode 0x60 at 0x0000
10-16 10:13:46.049: D/dalvikvm(717): VFY: dead code 0x0002-000b in Lcom/weibo/net/WeiboDialog;.<init> (Lcom/weibo/net/Weibo;Landroid/content/Context;Ljava/lang/String;Lcom/weibo/net/WeiboDialogListener;)V
10-16 10:13:46.059: W/dalvikvm(717): VFY: unable to resolve static field 848 (close_selector) in Lcom/weibo/android/R$drawable;
10-16 10:13:46.059: D/dalvikvm(717): VFY: replacing opcode 0x60 at 0x001e
10-16 10:13:46.069: D/dalvikvm(717): VFY: dead code 0x0020-005f in Lcom/weibo/net/WeiboDialog;.setUpCloseBtn ()V
10-16 10:13:46.079: W/dalvikvm(717): VFY: unable to resolve static field 845 (dialog_left_margin) in Lcom/weibo/android/R$dimen;
..........................
10-16 10:13:46.099: E/AndroidRuntime(717): FATAL EXCEPTION: main
10-16 10:13:46.099: E/AndroidRuntime(717): java.lang.NoClassDefFoundError: com.weibo.android.R$style
..................
这是因为你只是引用了jar包,但是没有引进资源,所以生成不了R类,在project.properties里面添加一行:
android.library.reference.1=../com_weibo_android
而且你要注意一点!!! 把你原来添加的在libs下的jar包删除掉,不然会有两个一样的jar包在你的工程。
我将com_weibo_android.jar添加到libs文件下仍然出错:
10-16 10:13:46.039: W/dalvikvm(717): VFY: unable to resolve static field 867 (ContentOverlay) in Lcom/weibo/android/R$style;
10-16 10:13:46.039: D/dalvikvm(717): VFY: replacing opcode 0x60 at 0x0000
10-16 10:13:46.049: D/dalvikvm(717): VFY: dead code 0x0002-000b in Lcom/weibo/net/WeiboDialog;.<init> (Lcom/weibo/net/Weibo;Landroid/content/Context;Ljava/lang/String;Lcom/weibo/net/WeiboDialogListener;)V
10-16 10:13:46.059: W/dalvikvm(717): VFY: unable to resolve static field 848 (close_selector) in Lcom/weibo/android/R$drawable;
10-16 10:13:46.059: D/dalvikvm(717): VFY: replacing opcode 0x60 at 0x001e
10-16 10:13:46.069: D/dalvikvm(717): VFY: dead code 0x0020-005f in Lcom/weibo/net/WeiboDialog;.setUpCloseBtn ()V
10-16 10:13:46.079: W/dalvikvm(717): VFY: unable to resolve static field 845 (dialog_left_margin) in Lcom/weibo/android/R$dimen;
..........................
10-16 10:13:46.099: E/AndroidRuntime(717): FATAL EXCEPTION: main
10-16 10:13:46.099: E/AndroidRuntime(717): java.lang.NoClassDefFoundError: com.weibo.android.R$style
..................
这是因为你只是引用了jar包,但是没有引进资源,所以生成不了R类,在project.properties里面添加一行:
android.library.reference.1=../com_weibo_android
而且你要注意一点!!! 把你原来添加的在libs下的jar包删除掉,不然会有两个一样的jar包在你的工程。
相关文章推荐
- 运行时的“VFY: unable to resolve static field”错误
- 消除运行时的“VFY: unable to resolve static field”错误
- 百度定位SDK出错:unable to resolve static field 155 (SUPPORTED_ABIS) in Landroid/os/Build
- Android4.x引用第三方jar发生java.lang.NoClassDefFoundError and VFY: unable to resolve static method
- 导入android项目出现:出现Unable to resolve target 'android-8'错误及其他的一些解决办法
- 安装Opencv4Android SDK时出现错误‘Unable to resolve target 'android-14'’
- ubuntu 下修复使用sudo命令后出现主机名字不能解析的错误:Fix Ubuntu sudo Error:unable to resolve host
- Ubuntu / Debian: sudo 出现 unable to resolve host 错误解决办法
- 升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误
- 升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误
- 升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误
- 关于搭载新版本SDK后,导入以前的工程出现Unable to resolve target 'android-6'的解决办法
- sudo不起作用,出现unable to resolve host错误的解决办法
- 升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误
- Android工程出现错误Unable to resolve target 'android-19'
- 关于Eclipse出现unable to resolve superclass错误的问题
- 升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误
- 导入android project到 eclipse 出现Unable to resolve target 'android-8'的错误
- Android 导入工程出现Unable to resolve target 'android-xx'错误
- sdk引用时引发的错误Unable to execute dex: Multiple dex files define Lcom/lapel/config/Config;