1

当我玩入门练习“在本机 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 , 模拟器

4

2 回答 2

14

右键单击Android项目,选择属性,Java Build Path,并在Order and Export下检查Android Private Libraries

于 2013-06-04T05:53:00.077 回答
0

这个问题也可能是由于android-support-v4.jar依赖列表中有两个版本,

android-support-v4.jar从您的项目库文件夹中删除。现在清理并构建您的项目并运行。

于 2014-11-29T05:13:22.877 回答