Can't use account manager with asmack


I am trying to use account manager with asmack but I am getting compiler error:

Here is my code:

ConnectionConfiguration config = new ConnectionConfiguration(“SERVER IP”, 5222,“localhost”);


XMPPConnection conn2 = new XMPPTCPConnection(config);


AccountManager am = new AccountManager(conn2);

In AccountManager line I am getting following error:

The constructor AccountManager(XMPPConnection) is not visible

How can I resolve it ?