I think I have found the problem. My phone had a copy of onedrive files. I had previously only deleted the Joplin folder in my Mac. It had probably not propagated to my phone before reinstall. I also found empty folders named net.cozic.joplin in my internal storage Android/data folder and also on the SDCard android/data folder. Deleted those as well.
I have imported my backup to my mac and it has synchronized to my phone. Thanks for the help.