I deleted my project from Firebase console and from Google cloud console. After deleting the projects, when I am trying to connect Firebase in my Android app, I am getting this
TL;DR: It could take up to 30 days for a project to be completely deleted and only after complete deletion will you be able to re-use the SHA-1.
Workaround: If you're project is still in waiting period, you could recover the project, delete the SHA-1 association, then proceed with deleting the project again.
When deleting a project, it would first go into the 7-day waiting period before the actual deletion. Referring to this Google Help Doc (emphasis mine):
Shutting down a project stops all billing and traffic serving, shuts down any Google Cloud Platform App Engine applications, and terminates all Compute Engine instances. All project data associated with Google Cloud and Google APIs services becomes inaccessible.
After a 30-day waiting period, the project and associated data are permanently deleted from the console.
Note that after the 30-day waiting period ends, the time it takes to completely delete a project may vary. For example, if a project has billing set up, it might not be completely deleted until the current billing cycle ends, you receive the next bill, and your account is successfully charged. Additionally, the number and types of services in use may also affect when the system permanently deletes a project.
And if you also see @Kato's comment in this post:
It takes up to 30 days to completely purge an app.
Possibly helpful similar posts: