Just started Android Programming but as soon as I create a new projects 2 errors come up both saying:
R cannot be resolved as a variable
I searched the error online and found TONS of questions with this topic, however no solutions work for me.
P.S I am using the latest version of Eclipse
Edit I just created the project and this error comes right away.
Here is the code:
package com.example.firstapp;
import android.os.Bundle; import android.app.Activity; import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); //error
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu); //error
return true;
}
}