Possible Duplicate:
R cannot be resolved to a variable - Hello World
I was developing my first app but get stuck on mainactivity.java
.
Here is my code:
package com.nterface;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
/** Called when the user clicks the Send button */
public void sendMessage(View view) {
// Do something in response to button
}
}
An error occurs on line setContentView(R.layout.activity_main);
Multiple markers at this line:
- R cannot be resolved to a variable
- Line breakpoint:MainActivity [line: 12]- onCreate(Bundle)