Cannot instantiate the type XMPPconnection

Context context = getApplicationContext();

SmackAndroid smak = SmackAndroid.init(context);

private XMPPConnection connection;

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

connection = new XMPPConnection(config);

connection = new XMPPConnection(“jabber.at”);

Above 2 lines give me the same error: “Cannot instantiate the type XMPPconnection”

Depending on how up-to-date your (a)Smack version is, you may have to use XMPPTCPConnection.

Works! Thank you very much.