Gmail read error

I am getting the following error on my Samsung phone “Cannot connect to server doesn’t support encrypted passwords using Cram-md5” when I try to finish the setup
Settings
imap.gmail.com
ssl/tls
port 993
username@gmail.com
encrypted password
mypassword
auto-detect imap namespace
use compression on network
have checked and unchecked mobile wifi and other no difference

K-9 version 5.600

You should have your password setting as “normal”, not “encrypted”.

Also note, you’ll need to set up an “app password” in gmail. Your regular gmail web-interface password won’t work.