Cannot convert from View to Button
<p>Very frustrating problem I have here. I have this code:</p>

<pre><code>Button b = findViewById(android.R.id.button1);
</code></pre>

<p>And I'm getting this error on it:</p>

<blockquote>
  <p>Type mismatch: cannot convert form View to Button</p>
</blockquote>

<p>But button1 <strong>is</strong> a button!! In my XML layout document the button has been declared like this:</p>

<pre><code>&lt;Button
   android:id = "@+id/button1"
   android:layout_width = "wrap_content"
   android:layout_height = "wrap_content"
   android:text = "Next Activity" 
/&gt;
</code></pre>

<p>And in my R.java:</p>

<pre><code>public static final class id {
   public static final int button1=0x7f050000;
}
</code></pre>

<p>Why I get and error saying that my button is a view when it actually is indeed a button... is a mystery.</p>
