title: Receive data firebase error - android
body: <p><img src="https://i.stack.imgur.com/zMHou.png" alt="Error message"></p>
  
  <p>Code compiles ok - Problem is at showing data from server firebase</p>
  
  <p>I need only one table from general table.</p>
  
  <p>EXAMPLE:</p>
  
  <p>Firebase database:</p>
  
  <pre><code>CLIENTE --&gt; NAME: &lt;--- ONLY SHOW THIS DATA
          TELEPHONE:
          etc...
  </code></pre>
  
  <p>CODE:</p>
  
  <p>MainClass Show List Viewer.</p>
  
  <pre><code>public class ShowClienteFragment extends Fragment {
  
      ArrayList&lt;ShowCliente&gt; myList = new ArrayList&lt;&gt;();
      ArrayList&lt;ShowCliente&gt; mKeys = new ArrayList&lt;&gt;();
  
      private ListView newListView;
  
      private DatabaseReference gDatabase;
  
  
  
      public ShowClienteFragment() {
          // Required empty public constructor
      }
  
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          gDatabase = FirebaseDatabase.getInstance().getReference();
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
         View view = inflater.inflate(R.layout.fragment_show_cliente, container, false);
         newListView = view.findViewById(R.id.lvCliente);
         final ArrayAdapter&lt;ShowCliente&gt; arrayAdapter = new ArrayAdapter&lt;&gt;(getActivity(),android.R.layout.simple_list_item_1, myList);
         newListView.setAdapter(arrayAdapter);
  
          gDatabase.child("cliente").addChildEventListener(new ChildEventListener() {
              @Override
              public void onChildAdded(DataSnapshot dataSnapshot, String s) {
                ShowCliente show  = dataSnapshot.getValue(ShowCliente.class);
                myList.add(show);
                //ShowCliente key = dataSnapshot.getKey();
                //mKeys.add(key);
                arrayAdapter.notifyDataSetChanged();
              }
  
              @Override
              public void onChildChanged(DataSnapshot dataSnapshot, String s) {
                //  String data = dataSnapshot.getValue(String.class);
                //String key = dataSnapshot.getKey();
                // int index = mKeys.indexOf(key);
                //  arrayAdapter.notifyDataSetChanged();
  
              }
  
              @Override
              public void onChildRemoved(DataSnapshot dataSnapshot) {
  
              }
  
              @Override
              public void onChildMoved(DataSnapshot dataSnapshot, String s) {
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
  
           return view;
      }
  
  }
  </code></pre>
  
  <p>Constructor Class</p>
  
  <pre><code>public class ShowCliente {
  
  
      private String razonsoc;
  
      public ShowCliente() {
      }
  
      public String getRazonsoc() {
          return razonsoc;
      }
  
      public void setRazonsoc(String razonsoc) {
          this.razonsoc = razonsoc;
      }
  }
  </code></pre>