I am new to android development I have installed SDK in netbeans 7.1.1 . This is the default code which gets generated when i create a new android project in netbeans
package android.bug;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Default code should be free from errors but i am getting an error in the last line i.e "setContentView(R.layout.main)"
error is : package R does not exist
But when i import R package in the above code then i get a different error in the same line i.e "setContentView(R.layout.main)"
error :cannot find symbol : main