title: java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.String
body: <p>Hey can anyone help me out clearing this error : </p>
  
  <p>java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.String
      at in.xyz.firebase.MainActivity$1.onDataChange   </p>
  
  <p><strong>MainActivity.java</strong> </p>
  
  <pre><code>import java.lang.String;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle; 
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.Button;
  import android.widget.TextView;
  
  import com.firebase.client.DataSnapshot;
  import com.firebase.client.Firebase;
  import com.firebase.client.FirebaseError;
  import com.firebase.client.ValueEventListener;
  
  public class MainActivity extends AppCompatActivity {
  
  private Firebase mRef;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Firebase.setAndroidContext(this);
  }
  
  @Override
  protected void onStart() {
      super.onStart();
      Button b1 = (Button) findViewById(R.id.buttonSunny);
      Button b2 = (Button) findViewById(R.id.buttonFoggy);
     final  TextView t1 = (TextView) findViewById(R.id.textView);
  
      mRef = new Firebase("https://docs-    examples.firebaseio.com/web/saving-data/fireblog/posts");
  
      mRef.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              String value = (String) dataSnapshot.getValue();
              t1.setText(value);
          }
  
          @Override
          public void onCancelled(FirebaseError firebaseError) {
  
          }
      });
  }
  }
  </code></pre>
  
  <p>Does anyone have any idea how to resolve this?</p>