'CometChat Cannot resolve symbol 'CometChatUserListScreen'

I have been following the tutorial for CometChat. It seems some imports are not working. How to I fix?

tutorial site: https://www.cometchat.com/tutorials/how-to-build-an-android-chat-app-in-java

public class ContactActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_contact);

        CometChatUserListScreen.setItemClickListener(new OnItemClickListener<User>() 
    {
            @Override
            public void OnItemClick(User var, int position) {
                 Intent intent = new 
Intent(ContactsActivity.this,CometChatMessageScreen.class);
                intent.putExtra(StringContract.IntentStrings.UID, var.getUid());
                intent.putExtra(StringContract.IntentStrings.NAME, var.getName());
                intent.putExtra(StringContract.IntentStrings.AVATAR, var.getAvatar());
                intent.putExtra(StringContract.IntentStrings.TYPE, 
CometChatConstants.RECEIVER_TYPE_USER);
                startActivity(intent);
            }
            @Override
            public void OnItemLongClick(User var, int position) {
                super.OnItemLongClick(var, position);
            }
        });
    }
}

screen shot here



Solution 1:[1]

Its a common problem with IDE's, make sure your dependency is on your classpath. Also, see the following links:

Why Intellij do not find any Maven dependencies in pom.xml?

In IntelliJ, Maven can't resolve dependencies

Intellij Idea often doesn't resolve Maven Dependency

Force Intellij IDEA to reread all maven dependencies

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Orby