Above solutions are correct to a point. But if someone still faces an issue . Delete the key from developer profile and add it again writing= at the end and press enter . You have to add key in both settings and developer.
I was facing issues with app release to google play and using release key