android.widget.EditText cannot be cast to android.widget.Button
<p>Myactivity</p>

<pre><code>public class MyActivity extends Activity {
    private Button bt;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        bt= (Button) findViewById(R.id.bt_1);
    }
}
</code></pre>

<p>main.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
        &gt;
    &lt;EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="New Button"
            android:id="@+id/edittext"/&gt;
    &lt;Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="New Button"
            android:id="@+id/bt_1" /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>I have the following questions(intellij IDEA):</p>

<ol>
<li><p>When I chage the layout relative position:Button up,EditText down,the problem is solved;else the problem come again!</p></li>
<li><p>When delect the code"bt= (Button) findViewById(R.id.bt_1);"the problem is solved.</p></li>
</ol>

<p><img src="https://i.stack.imgur.com/IiWrG.png" alt="the logcat description follows"></p>