I can't download Xcode or Open the .dmg files when I download from developers page.

Everytime I try to download Xcode from the app store, it downloads but when installing, it stops on 8 minutes left everytime and re-directs me to the app store onto the purchased tab saying "An error has occured" Any advice? Need it asap.

I can't download Xcode or Open the .dmg files when I download from developers page.
 
 
Q