Apple's situation is completely different from Android. Demand for iphone devices was the leverage Apple had over carriers to do this, and it's not a fragmented ecosystem in the first place.
Google didn't even make any phones until much later. Instead they gave phone manufacturers the green light to do whatever they wanted. They ended up designing phones later because of how crappy the Android phone ecosystem had become. Google could have made Nexuses from the get-go.