title: Android Firebase cannot resolve method getRef(position)
body: <p>I see there are a lot of examples in github where people are using such method:</p>
  
  <pre><code>String postKey = getRef(position).getKey();
  </code></pre>
  
  <p>But in my Android Studio it does not resolve <code>getRef(int)</code> method. Here is the code:</p>
  
  <pre><code>@Override
  public void onDataChange(DataSnapshot dataSnapshot) {
  
      articleModel = new ArrayList&lt;&gt;();
      for (DataSnapshot postSnapshot: dataSnapshot.getChildren()) {
          articleModel.add(postSnapshot.getValue(ArticleModel.class));
      }
  
      adapter = new ArticleAdapter(getActivity().getApplicationContext(), R.layout.fragment_article_list_items, articleModel);
  
      mListView.setAdapter(adapter);
      mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, final int position, long id) {
              Intent intent = new Intent(getActivity(), ArticleDetailsActivity.class);
              String postKey = getRef(position).getKey();
              intent.putExtra(ArticleDetailsActivity.EXTRA_POST_KEY, postKey);
              getActivity().startActivity(intent);
          }
      });
  }
  </code></pre>
  
  <p>Does anyone know why this happens and how to solve this problem?</p>