hi i am getting an error that DroidGap cannot be resolved as a type
my code is
package com.hello.ponegap;
import android.app.Activity;
import android.os.Bundle;
import com.hello.*;
public class HelloponegapActivity extends DroidGap {
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) {
super.loadUrl("file:///android_asset/www/index.html");
super.onCreate(savedInstanceState);
}
}
thanks in advance
also i am not getting build path when i right click on lib
Add this line to the imports
EDIT:
If you are using Eclipse, you can use the key combination
Ctrl + Shift + Oto organize imports. This removes unused imports, and also will import the needed packages and/or classes (If there are multiple possibilities, e.g.android.view.View.OnClickListenerandandroid.content.DialogInterface.OnClickListener, Eclipse will give you the chance to select the desired class to import).EDIT:
You did not add the cordova jar to the build path. I checked your
.classpathfile on the github repo, and it lacks this line:<classpathentry kind="lib" path="libs/cordova-1.8.1.jar"/>.Solution: Right-click on the
codova-1.x.x.jar-> Build path -> Add to build path.Please try to follow the steps defined here.
EDIT
Do the following: 1. Right-click the project. 2. Click properties. 3. On the left, select Java Build Path. 4. You see four tabs:
Source,Projects,Libraries,Order and Export. SelectLibraries. 5. On the right click the buttonAdd JARs.... 6. Search forcordova-1.x.x.jarin your project, and select it. 7. ClickOK. 8. Done