title: Android error cannot find symbol
body: <p>guys! I had problem with this error <strong><em>java: cannot find symbol</em></strong> in my android application project recently. I don't know where is the error that made the problem. Here is my file details:</p>
  
  <p><strong><em>navigation_bar_layout.xml</em></strong> :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/navigation_bar"
              android:layout_width="match_parent"
              android:layout_height="50dp"
              android:background="#515151"
              android:layout_alignParentTop="true"&gt;
  &lt;!--Back--&gt;
  &lt;ImageView android:id="@+id/back_icon"
             android:layout_width="50dp"
             android:layout_height="50dp"
             android:padding="5dp"
             android:layout_centerVertical="true"
             android:layout_alignParentLeft="true"
             android:src="@drawable/back_icon"/&gt;
  &lt;!--Title--&gt;
  &lt;TextView
          android:id="@+id/title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:gravity="center_vertical"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"/&gt;
  &lt;!--Menu--&gt;
  &lt;ImageView
          android:id="@+id/menu"
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:padding="5dp"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong><em>NavigationBar.java</em></strong> :</p>
  
  <pre><code>import android.content.Context;
  import android.util.AttributeSet;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.ImageView;
  import android.widget.RelativeLayout;
  import android.widget.TextView;    
  
  public class NavigationBar extends RelativeLayout implements OnClickListener{
  public NavigationBar(Context context){
      this(context, null);
  }
  
  private ImageView backImageView;
  private TextView titleView;
  private ImageView menuImageView;
  
  public NavigationBar(Context context, AttributeSet attrs){
      super(context, attrs);
  
      View view     = LayoutInflater.from(context).inflate(R.layout.navigation_bar_layout, this, true);
      backImageView = (ImageView) view.findViewById(R.id.back_icon);
      titleView     = (TextView) view.findViewById(R.id.title);
      menuImageView = (ImageView) view.findViewById(R.id.menu);
  
      backImageView.setOnClickListener(this);
      menuImageView.setOnClickListener(this);
  }
  
  
  public ImageView getBackImageView(){ return backImageView; }
  public TextView getTitleView(){ return titleView; }
  public ImageView getMenuImageView(){ return menuImageView; }
  
  public void setTitle(String title){ titleView.setText(title); }
  
  private ClickCallBack clickCallBack;
  public void setClickCallBack(ClickCallBack clickCallBack){ this.clickCallBack = clickCallBack; }
  public static interface ClickCallBack{
      void onBackClick();     
      void onMenuClick();     
  }
  
  @Override
  public void onClick(View v) {
      int id = v.getId();
      if(id == R.id.back_icon){
          clickCallBack.onBackClick();
          return;
      }
      if(id == R.id.menu){
          clickCallBack.onMenuClick();
          return;
      }
    }
  }
  </code></pre>
  
  <p>And, here is <strong><em>error console</em></strong> :</p>
  
  <pre><code>Error:(24, 9) java: cannot find symbol
  symbol:   variable backImageView
  location: class com.example.MyFirstAndroidApp.NavigationBar
  Error:(24, 37) java: cannot find symbol
  symbol:   variable view
  location: class com.example.MyFirstAndroidApp.NavigationBar
  Error:(25, 36) java: cannot find symbol
  symbol:   variable view
  location: class com.example.MyFirstAndroidApp.NavigationBar
  Error:(26, 37) java: cannot find symbol
  symbol:   variable view
  location: class com.example.MyFirstAndroidApp.NavigationBar
  </code></pre>
  
  <p>Any ideas?</p>