Unable to resolve superclass of Lcom/worklight/androidgap/WLDroidGap

大兔子大兔子 提交于 2019-12-08 07:59:38

问题


When I play with Getting Started exercise "Using Worklight API in native Android applications", I get failed to connect to worklight server from native Android page, and error messages below:

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.

Environment information:

Operation System: Windows 7, 64 bit
Java: Oracle, 1.6.0_45, 64 bit
Installation type: Developer Edition
Eclipse: Java EE, Juno SR2
Worklight plug-in : 5.0.6.20130311
Environment details: Android, 4.2.2, API level 17, emulator


回答1:


right-clicking on the Android project, choosing properties, Java Build Path, and Checking the Android Private Libraries under Order and Export




回答2:


This problem can also be due two version of android-support-v4.jar in the dependency list,

delete android-support-v4.jar from your project libs folder. now clean and build your project and run.



来源:https://stackoverflow.com/questions/16893779/unable-to-resolve-superclass-of-lcom-worklight-androidgap-wldroidgap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!