1

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

JJD
  • 50,076
  • 60
  • 203
  • 339
user2424627
  • 169
  • 1
  • 6
  • I have been trying for a while now to get the sample working, but it does not contain the R.java file, so the build cannot even start to create an .apk... do you have an R.java file in your copy of the native Android project? – Idan Adar Jun 03 '13 at 16:49
  • 1
    It looks to me like there are other issues going on, but I was able to resolve the missing WLDroidGap error in another app by right-clicking on the Android project, choosing properties, Java Build Path, and checking the Android libraries under libraries. – Nell Gawor Jun 03 '13 at 21:49
  • 2
    Thanks Nell. Checking the Android Private Libraries under Order and Export gets that error gone. To Idan, you might being missing Android SDK Build-tools. – user2424627 Jun 04 '13 at 04:33

2 Answers2

14

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

user2424627
  • 169
  • 1
  • 6
0

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.

DjP
  • 4,537
  • 2
  • 25
  • 34