forum

Home / DeveloperSection / Forums / Android error - R cannot be resolved

Android error - R cannot be resolved

Anonymous User 1711 20-May-2015
I just downloaded and installed the new Android SDK. I wanted to create a simple application to test drive it.

The wizard created this code:

package eu.mauriziopz.gps;
import android.app.Activity;
import android.os.Bundle;
public class ggps extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
but Eclipse gives me the error

R cannot be resolved
on line

setContentView(R.layout.main);
Why?

Updated on 20-May-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By