title: android - cannot resolve method findViewById(Int) in onCreate(Bundle savedInstanceState)
body: <p>I dunno why <code>Android Studio</code> cannot resolve that,</p>
  
  <p>this is the piece code of the problem</p>
  
  <p><code>MainActivity.java</code></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
    BarChart chart ;
    ArrayList&lt;BarEntry&gt; BARENTRY ;
    ArrayList&lt;String&gt; BarEntryLabels ;
    BarDataSet Bardataset ;
    BarData BARDATA ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      chart = (BarChart) findViewById(R.id.chart1); //error findViewById with red mark
  </code></pre>
  
  <p><code>activity_main.xml</code></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    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"
    tools:context=".MainActivity"&gt;
  
    &lt;com.github.mikephil.charting.charts.BarChart
      android:id="@+id/chart1"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" /&gt;
  </code></pre>