Automatically import smack classes on android studio

I include the Smack 2.1.6 to my project. When i write a Smack object android studio cant resolve this class and i manually import packages to project. I mean when i write AbstractXMPPConnection foo; android studio cannot resolve AbstractXMPPConnection class and i past " import org.jivesoftware.smack.AbstractXMPPConnection;"
it can resolve. Why android studio can’t import automatically smack packages.


For automatic inclusion of smack jar files in the project you have to add following dependencies in your project:

dependencies {

compile “org.igniterealtime.smack:smack-android:4.1.0”
// Optional for XMPPTCPConnection
compile “org.igniterealtime.smack:smack-tcp:4.1.0”
// Optional for XMPP-IM (RFC 6121) support (Roster, Threaded Chats, …)
compile “org.igniterealtime.smack:smack-im:4.1.0”
// Optional for XMPP extensions support
compile “org.igniterealtime.smack:smack-extensions:4.1.0”