How to fix packaging errors after cloning a project?

Thank goodness this is documented here. I was frustrated that I got this error after changing my project’s name.