当我使用“入门”练习“在原生Android应用程序中使用Worklight API”时,我无法从本机Android页面连接到worklight服务器,以及下面的错误消息:
Unable to resolve superclass of Lcom/worklight/androidgap/WLDroidGap; (435)
Link of class 'Lcom/worklight/androidgap/WLDroidGap;' failed
Could not find method com.worklight.androidgap.WLDroidGap.getWLConfig,
referenced from method com.worklight.common.WLUtils.checkIfMediaFile
VFY: unable to resolve static method 253: Lcom/worklight/androidgap/WLDroidGap;
.getWLConfig ()Lcom/worklight/common/WLConfig;
VFY: replacing opcode 0x71 at 0x0001
Unable to resolve superclass of Lcom/worklight/androidgap/WLDroidGap; (435)
Link of class 'Lcom/worklight/androidgap/WLDroidGap;' failed
Could not find method com.worklight.androidgap.WLDroidGap.getWLConfig,
referenced from method com.worklight.common.WLUtils.computeChecksumOnResources
VFY: unable to resolve static method 253: Lcom/worklight/androidgap/WLDroidGap;
.getWLConfig ()Lcom/worklight/common/WLConfig;
VFY: replacing opcode 0x71 at 0x0021
Unable to resolve superclass of Lcom/worklight/androidgap/WLDroidGap; (435)
Link of class 'Lcom/worklight/androidgap/WLDroidGap;' failed
VFY: unable to find class referenced in signature (Lcom/worklight/androidgap/WLDroidGap;)
Unable to resolve superclass of Lcom/worklight/androidgap/WLDroidGap; (435)
Link of class 'Lcom/worklight/androidgap/WLDroidGap;' failed
Could not find method com.worklight.androidgap.WLDroidGap.getLocalStorageWebRoot,
referenced from method com.worklight.common.WLUtils.findDrawableAsset
unable to resolve virtual method 248: Lcom/worklight/androidgap/WLDroidGap;
.getLocalStorageWebRoot ()Ljava/lang/String;
VFY: replacing opcode 0x6e at 0x0007
Skipped 31 frames! The application may be doing too much work on its main thread.
环境信息:
操作系统:Windows 7,64位
Java:Oracle,1.6.0_45,64位
安装类型:开发人员版
Eclipse:Java EE,Juno SR2
Worklight插件:5.0.6.20130311
环境详细信息:Android,4.2.2,API级别17,模拟器
答案 0 :(得分:14)
右键单击Android项目,选择属性,Java构建路径以及在订单和导出下检查Android私有库
答案 1 :(得分:0)
此问题也可能是因为依赖项列表中的android-support-v4.jar
的两个版本,
从项目libs文件夹中删除android-support-v4.jar
。现在清理并构建您的项目并运行。