title: Firebase reference object cannot be resolved to a type
body: <p>I just start building my Android app by following this docs: <a href="https://www.firebase.com/docs/reading-data.html" rel="nofollow noreferrer">https://www.firebase.com/docs/reading-data.html</a></p>
  
  <p>After setting up libraries and permission, I start typing the very few lines of code. And immediately I got a list of compile errors as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/7jDGr.png" alt="enter image description here"></p>
  
  <p>I then tried typing "dataRef." and Ctr+Space, there was no Default Proposals but a a red message saying "dataRef can not be resolved to a type". dataRef is the reference to firebase database (just like the one in the docs's snippet)</p>
  
  <p><img src="https://i.stack.imgur.com/5kPlk.png" alt="enter image description here"></p>
  
  <p>So what was wrong?</p>
  
  <p>Ps: I also tried cleaning the project.
  I believe that my Firebase library is the latest, as its name is "firebase-client-jvm-LATEST" and I just downloaded it today.
  I din't add any xml or build anything yet.
  Below is my MainActivity.java:</p>
  
  <pre><code>package com.biz.nah;
  
  import com.firebase.client.DataSnapshot;
  import com.firebase.client.Firebase;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          // Create a reference to database
          String url = "https://nah.firebaseio.com";
          Firebase dataRef = new Firebase(url);
  
          dataRef.addListenerForSingleValueEvent(new ValueEventListener() {
               @Override
               public void onDataChange(DataSnapshot snapshot) {
                   // Do some stuff once
               }
  
               @Override
               public void onCancelled() {
                   System.err.println("Listener was cancelled");
               }
          });
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  }
  </code></pre>