If you are trying to build an Android Application using PhoneGap/Apache Cordova, you may get this error.
The error may occur in two conditions :
- You have not included the PhoneGap.jar / cordova-2.0.0.jar to your build path. To do so, first copy the jar file to /libs directory under project directory. Then right click on project directory in eclipse, click "Build Path -> Configure Build Path". Under Java Build Path Select Libraries tab and click on "Add JARs" button. Choose the copied jar file from "lib" directory.
- You have not extended your activity from DroidGap. Check the java source file of your project the main activity should be derived from DroidGap as below:
public class MainActivity extends DroidGap.