title: How to solve "It is indirectly referenced from required .class files" error in android?
body: <p>I am building android application where I am using chat model. There is a WebSite Name as QuickBlox where all server side part is handle by them. I am using it for my application.They provide some sample Android code too, I have import the sample code and add all the lib and jar that need to run that project.</p>
  
  <p>Now the problem is in one of my class there is a error of "It is indirectly referenced from required .class files" What dose it mean and how to solve this can any one help me in solving this issue. </p>
  
  <p>Below is my class code -</p>
  
  <pre><code>public class UsersAdapter extends BaseAdapter {
  
  private List&lt;QBUser&gt; dataSource;
  private LayoutInflater inflater;
  private List&lt;QBUser&gt; selected = new ArrayList&lt;QBUser&gt;();
  
  public UsersAdapter(List&lt;QBUser&gt; dataSource, Context ctx) {
      this.dataSource = dataSource;
      this.inflater = LayoutInflater.from(ctx);
  }
  
  public List&lt;QBUser&gt; getSelected() {
      return selected;
  }
  
  @Override
  public int getCount() {
      return dataSource.size();
  }
  
  @Override
  public Object getItem(int position) {
      return dataSource.get(position);
  }
  
  @Override
  public long getItemId(int position) {
      return position;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      ViewHolder holder;
      if (convertView == null) {
          convertView = inflater.inflate(R.layout.list_item_user, null);
          holder = new ViewHolder();
          holder.login = (TextView) convertView.findViewById(R.id.userLogin);
          holder.add = (CheckBox) convertView.findViewById(R.id.addCheckBox);
          convertView.setTag(holder);
      } else {
          holder = (ViewHolder) convertView.getTag();
      }
      final QBUser user = dataSource.get(position);
      if (user != null) {
          holder.login.setText(user.getLogin());
          holder.add.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  if ((((CheckBox) v).isChecked())) {
                      selected.add(user);
                  } else {
                      selected.remove(user);
                  }
              }
          });
          holder.add.setChecked(selected.contains(user));
      }
      return convertView;
  }
  
  private static class ViewHolder {
      TextView login;
      CheckBox add;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is Documentation code for Android - [<a href="http://quickblox.com/developers/Android][1]" rel="nofollow">http://quickblox.com/developers/Android][1]</a></p>