Reputation: 63
I booted up eclipse to start on a project, and without typing in a word I already have several errors.
package department.namespace;
import android.app.Activity;
import android.os.Bundle;
public class DepartmentActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
At package department.namespace, it says:
multiple marks at this line and the type java.lang.Object
cannot be resolved. It is indirectly referenced from required .class files
The import android.os cannot be resolved.
Override cannot be resolved as a type
The method OnCreate(Bundle) is undefined for the type Activity
R. cannot be resolved as a variable.
Since this JUST came up when I started Eclipse, how do I fix this?
Upvotes: 1
Views: 2295
Reputation: 6087
First, you should start by cleaning and building the project. This can be done by selecting the project of interest and then selecting the appropriate option from the project menu.
If that doesn't resolve the issue, then I would recommend checking the projects build path to ensure that your expected dependencies are present and accounted for. If I remember correctly when I have had this issue in the past, it helps to remove and re-add the JRE of choice.
To look into this issue further, you might check some of the following links:
Upvotes: 1