Can't get Google Play after flashing firmware I've recently rooted my phone in pursuit of freeing up the internal memory from system apps. I then tried uninstalling Gmail by deleting the file and then trying to reinstall it from the play store but the apk deletion seemed to put it in a strange state where it disappeared from the phone (after a while when the icon was first removed and replaced by the default android app icon and then once after resetting the phone, it didn't exist any more; but still the play store considers it as installed). I tried flashing my phone to the same firmware as I had earlier (XSG), and now I cant get Google play (only the outdated Google market, which doesn't allow any installs from the play store online).  

My phone runs on Android 2.2 Froyo. Any idea what to do?

Thanks
I then tried uninstalling Gmail by deleting the file and then trying to reinstall it from the play store


You can't install it from the Play Store, you can only update an existing version.  This is to prevent phones that haven't met Google's official criteria from getting the core Google apps, though there are workarounds (see below).


  the apk deletion seemed to put it in a strange state where it disappeared from the phone ... but still the play store considers it as installed


Deleting the .apk is akin to deleting acrobat.exe from Windows without uninstalling Adobe Acrobat.  It won't run since it doesn't exist, but the system still thinks it's installed and there may be other junk left behind.

To fix this you'd need to flash the Google Apps package; this question might help with that.  Since you're only suffering from the Market not auto-updating right now, you can either try to trigger the update or manually install the new version; see this question for that.

In the future don't delete apps you want!  Or at least back them up :P