title: How to update user data Firebase?
body: <p>I want to increment score by 1 when user clicks a button, but value of score is not updated. When I updated it manually from Firebase console it updates. I don't know what the problem is. Can anyone help me, please?  </p>
  
  <pre><code> @Override
  public void onClick(View view) {
      if (view == add) {
          score++;
          databaseReference1 = databaseReference.child("score");
          databaseReference1.setValue(String.valueOf(score));
          databaseReference1.addValueEventListener(new ValueEventListener() {
              @Override
              public void onDataChange(DataSnapshot dataSnapshot) {
                  textView_earning.setText(score + " ");
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
  
      }
  }
  </code></pre>