I am doing the Notepad tutorial, exercise 2. I started by creating a new Android project and chose Create from source to import the downloaded source files for the excercise.
But now I get many errors in Eclipse, and the problem is that there is no generated R.java
class. How can I solve this? The folder gen/
is empty.
I have errors on Notepadv2.java
and in res/layout/note_edit.xml
and both seems to be related to the fact that the generated R.java
is missing.
Here is my import
statements in Notepadv2.java
:
import android.R;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
They are created by the Eclipse command Ctrl+Shift+O.