The last apartment I lived in didn't have any trees at all to hang anything, but I did get on HF with 60 feet of wire and the first contact I made was Iceland on 17meters CW, The wire was only 10 feet or so off the ground strung between windows at the front and back of the apartment. During a wind storm I could hear the wire slapping the side of the building. I got on 40, 20 and 10 with the same wire, fed with a short length of twin lead through an MFJ 945C. it worked for me.
Now my new place has trees and I built and installed an OCF with the feed point at almost 50 feet and get on 80-10 and have a blast. A G5RV is really not a great antenna, only works real good on 20 meters. I had one many years ago and mine worked very well because I had the feed line, RG6 double braid coax, buried in the ground and the flat top was at about 50 feet and it's length was modified a little bit (longer) and worked great. People who just put up the antenna they buy are not getting as good as they could get when you build one yourself.
You can do anything, you can hang a wire out the window and it will work.