title: Failed to convert value of type java.util.HashMap to String. Converting string to map
body: <p>Below is my code. I get this error &quot;com.google.firebase.database.DatabaseException: Failed to convert value of type java.util.HashMap to String&quot; . Please help.</p>
  <pre><code> du = FirebaseDatabase.getInstance().getReference().child(&quot;storename&quot;);
      du.keepSynced(true);
      du.addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              GenericTypeIndicator&lt;Map&lt;String, String&gt;&gt; genericTypeIndicator = new GenericTypeIndicator&lt;Map&lt;String, String&gt;&gt;() {
              };
              Map&lt;String, String&gt; map = dataSnapshot.getValue(genericTypeIndicator);
              name.setText(map.get(&quot;ownerName&quot;));
              storename.setText(map.get(&quot;compName&quot;));
              storeaddr.setText(map.get(&quot;address&quot;));
              ph1.setText(&quot;Ph: &quot; + map.get(&quot;phoneNumber&quot;));
              gst.setText(map.get(&quot;gstNum&quot;));
          }
  
          @Override
          public void onCancelled(DatabaseError error) {
          }
      });
  </code></pre>
  <p><img src="https://i.stack.imgur.com/lLpVO.png" alt="Firebase Image" /></p>