title: Cannot resolve method and LinearLayout
body: <p>I'm having problems with my code...
  Before, it worked, then I added some simple lines in the layout and now I have lots of erros. I'm trying to learn by myself how to do an app for my schools libray so I'm no pro.
  Thanks for any help.</p>
  
  <p>The error here is "Cannot resolve R"</p>
  
  <p>`@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);</p>
  
  <pre><code>    majorOb = (Spinner) findViewById(R.id.spinnerMaj);
      yearOb = (Spinner) findViewById(R.id.spinnerYear);
      semesterOb = (Spinner) findViewById(R.id.spinnerSem);
      classOB = (Spinner) findViewByID(R.id.spinnerClass);
      button1 = (Button) findViewById(R.id.button1);
      tv1 = (TextView) findViewById(R.id.textview1);
      Resources res = getResources();
      array1 = res.getStringArray(R.array.Books);`
  </code></pre>
  
  <p>The error here is: Element LinearLayout doesnt have the required attribute: layout_height adn layout_width</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  tools:context="com.example.marcosbiblio.projetofinal.MainActivity"&gt;
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"&gt;
  </code></pre>