简体   繁体   中英

how to read gmail programmatically in android

I know this questioned has been answered. I've found the exact same answer twice on stack overflow and once elsewhere. My problem is I can't get it to work. I cut and paste it into Android Studio and I get the image pasted below. It does not seem to recognize either Store or Session or the word mail. I'm not sure what I should be importing and Android Studio is not lending any help. Any guidance would be greatly appreciated.

Thanks for the comments. I've edited my question with a new screen shot. As you can see when I do alt enter on Session I get what looks like nonsense options dealing with spell checker and other things.

Thanks again

Chris

在此处输入图片说明

If you look carefully at the end of that prompt it will show you ALT+ENTER, that means you can press alt and hit enter at that point to have Android Studio assist you in picking 'which' Session class to import.

The problem is that right now there are 'multiple classes that CAN be imported with the name Session' and the 'auto-importer' doesn't know which one you mean.


My guess is that you need import javax.mail.Session; to import the Appropriate Session. (from This link that is talking about it )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM