I am trying to send an email using my application made in Android Studio, but something is wrong. Android Studio says that the symbols cannot be resolved, so nothing won't work. Are there any solutions for this problem?
Asked
Active
Viewed 3,198 times
0
-
2Have you imported the javax.mail library into your project? – Nick Isaacs Mar 03 '16 at 10:43
-
I downloaded a JAR-file called javax.mail-1.3.3.01, but I don't know where to put it. I tried to put it into the lib folder, but nothing happend. – thehulk Mar 03 '16 at 10:46
-
Did you add your javax.mail library to the dependencies ? – Rakshit Nawani Mar 03 '16 at 10:46
-
2Right click on it and select "Add as library" – Nick Isaacs Mar 03 '16 at 10:47
-
@NickIsaacs I think so . – IntelliJ Amiya Mar 03 '16 at 10:47
-
I have not changed anything in the dependencies, should I do that aswell? – thehulk Mar 03 '16 at 10:48
-
once you add as library your build.gradle should have 'compile files('libs/javax.mail.jar')' – Nick Isaacs Mar 03 '16 at 10:49
-
Where to right click, @NickIsaacs? – thehulk Mar 03 '16 at 10:49
-
@thehulk after copying to the lib folder, right click on the jar and select 'Add as library' – Nick Isaacs Mar 03 '16 at 10:50
-
NickIsaacs solution worked for me. – thehulk Mar 03 '16 at 10:52
2 Answers
0
Put your library in the lib folder and in your root dependency add the line
compile files('libs/your library name')
and then sync your gradle Try this

Rakshit Nawani
- 2,604
- 14
- 27