我想在我的項目中使用最新版本的smack 4.0.0,用於android studio 0.6.0的xmpp,代碼如下:錯誤:無法訪問用於javax.security.sasl.SaslException的SaslException類文件未找到
try{
ConnectionConfiguration config = new ConnectionConfiguration("wooxonline.com",4000);
XMPPConnection connection = new XMPPTCPConnection(config);
connection.connect();
connection.login("cliff","cliff123");
}
catch (SmackException e) {
e.printStackTrace();
}
catch (java.io.IOException e)
{
e.printStackTrace();
}
catch (XMPPException e) {
e.printStackTrace();
Log.i(TAG, "login failed!");
}
這幾乎就像與咂嘴樣本代碼示例,但我不能得到解決,如下跟蹤信息編譯問題:
Error:(58, 29) error: cannot access SaslException
class file for javax.security.sasl.SaslException not found
我卡在這裏,任何人都可以幫助看一看?
面臨着同樣的問題...任何人有解決方案嗎? –