Forster's answer is that friendship between individual Indians and English people is possible, at least for a time; but as a whole, the two races will not be able to forge a genuine connection until the whole apparatus of imperialism is swept away. Genuine friendship, liking and respect will be possible only when the two races are able to meet on a wholly equal footing.
This is the gist of the closing paragraphs of the novel, when Aziz and Fielding finally meet up again after a period of separation, misunderstanding and (on Aziz's part at least) actual hostility. Once again they debate the issue of inter-racial friendship, and Aziz concludes the two of them can only be true friends once 'every blasted Englishman' has been driven from India - certainly as rulers. (chapter 37). Fielding queries why they cannot be friends at that very moment, as they both desire it. But there are too many obstacles:
But the horses didn't want it - they swerved apart; the earth didn't want it, sending up rocks through which riders must pass single-file; the temples, the tank, the jail, the palace, the brds, the carrion, the Guest House, that came into view as they issued form the gap and saw Mau beneath: they didn't want it, they said in their hundred voices, 'No, not yet,' and the sky said, 'No, not there.' (chapter 37)
Forster makes the point rather fancifully in this closing paragraph that there are simply too many barriers to friendship between English and Indian in colonial India. Nature, both animate and inanimate (earth, birds, and carrion) appears to be against it; also various institutions - the temples and palaces - seem to want to prevent it, the very sky speaks out against it.
The whole novel has shown just how fraught the relationship between the English and Indians is: the English generally cold and contemptuous, the Indians sometimes servile and nearly always resentful. Disaster ensues as a result of Aziz's attempts to befriend Mrs Moore and Adela, and he very nearly loses his friendship with Fielding too. The sad fate of Mrs Moore also shows even those who are initially able to connect with other races in a wholly natural way (as exemplified in her first meeting with Aziz in the mosque) are likely to break down under social and cultural pressures.
However, Forster does hold out hope, even in the generally pessimistic closing paragraph quoted above, for proper friendship between English and Indian: if 'not yet', then in the future; if 'not there', in colonial India, then somewhere else.