I have added the dependencies in the gradle file but still the classes for the jar files are not recognized.
android {
compileSdkVersion 19
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.devstring.imageframe"
minSdkVersion 14
targetSdkVersion 14
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
// compile files('D:/EKCS-data/EDCloud/e.d.cloud/libs/activation.jar')
// compile files('D:/EKCS-data/EDCloud/e.d.cloud/libs/activation.jar/additionnal.jar')
// compile files('D:/EKCS-data/EDCloud/e.d.cloud/libs/activation.jar/mail.jar')
compile fileTree(dir: 'libs', include: '*.jar')
}
I get error - cannot resolve class here
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
I have already referred to the following
Android Studio missing external dependencies
Android Studio stuck on "Gradle: resolve dependancies '_debugCompile'" or 'detachedConfiguration1'
How to add local .jar file dependency to build.gradle file?
Android Studio stuck on gradle resolving dependencies
gradle - not able to find dependencies from maven repo
Gradle cannot resolve dependencies in Android Studio
EDIT
I tried building from gradle command line also.
I also do sync project with gradle files
Please help!
Thanks