title: get an runtime error: java.lang.RuntimeException: java.lang.NoSuchMethodException
body: <p>The problem is, I am getting the runtime error when I trying to get firebase data into a RecyclerView.
  Error is</p>
  
  <pre><code>java.lang.RuntimeException: java.lang.NoSuchMethodException
  </code></pre>
  
  <p>I have implemented it last time but now I can't get it what have I done wrong.</p>
  
  <p>My main class setting firebase initialization-</p>
  
  <pre><code> public class Shayari extends AppCompatActivity {
          private RecyclerView recyclerView;
          private DatabaseReference reference;
          TextView texttest;
          @Override
          protected void onCreate(@Nullable Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_shayari);
  
          texttest=findViewById(R.id.test);//just for test
  
  
          reference= FirebaseDatabase.getInstance().getReference("Catogory/Love");
          recyclerView=findViewById(R.id.recyclerview);
          recyclerView.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false));
          recyclerView.setHasFixedSize(true);
  
          FirebaseRecyclerAdapter&lt;DataModel,DataViewHolder&gt; adapter = new FirebaseRecyclerAdapter&lt;DataModel, DataViewHolder&gt;(
                  DataModel.class,
                  R.layout.item_recyclerview,
                  DataViewHolder.class,
                  reference) {
              @Override
              protected void populateViewHolder(DataViewHolder viewHolder, DataModel model, int position) {
                  viewHolder.setTitle(model.getTitle());
                  viewHolder.setShayari(model.getShayari());
  
              }
          };
          recyclerView.setAdapter(adapter);
          texttest.setText(reference.toString());
      }
  
      public class DataViewHolder extends RecyclerView.ViewHolder{
          TextView text_title,text_shayari;
          public DataViewHolder(View itemView) {
              super(itemView);
              text_title=itemView.findViewById(R.id.titletext);
              text_shayari=itemView.findViewById(R.id.shayaritext);
          }
  
          public void setShayari(String shayari) {
  
              text_shayari.setText(shayari);
          }
  
          public void setTitle (String title){
  
              text_title.setText(title);
  
          }
      }
  }
  </code></pre>
  
  <p>Model Class for getting data-</p>
  
  <pre><code>class DataModel {
      private String titles, shayaris;
  
      public DataModel() {
      }
  
      public DataModel(String titles, String shayaris) {
          this.titles = titles;
          this.shayaris = shayaris;
      }
  
  
      public String getTitle()
      {
          return titles;
      }
  
      public void setTitle(String title) {
         this.titles = title;
      }
  
      public String getShayari() {
          return shayaris;
      }
  
      public void setShayari(String shayari) {
          this.shayaris = shayari;
      }
  }
  </code></pre>
  
  <p>This is my firebase hierarchy structure</p>
  
  <p><a href="https://unikshayari.firebaseio.com/Catogory/Love/s01/shayaris" rel="nofollow noreferrer">https://unikshayari.firebaseio.com/Catogory/Love/s01/shayaris</a> "data"</p>