Add this line to the import
import org.apache.cordova.DroidGap;
EDIT:
If you use Eclipse, you can use a keyboard shortcut Ctrl + Shift + Oto organize the import. It removes unused imports, and import the necessary packages and / or classes (if there are several possibilities, for example android.view.View.OnClickListener, and android.content.DialogInterface.OnClickListener, the Eclipse will give you the opportunity to choose the class you want to import).
EDIT:
. .classpath github, : <classpathentry kind="lib" path="libs/cordova-1.8.1.jar"/>.
: codova-1.x.x.jar β β .
, .
: 1. . 2. . 3. " Java". 4. : Source, Projects, Libraries, Order and Export. Libraries. 5. Add JARs.... 6. cordova-1.x.x.jar . 7. OK. 8.