My recollection is that Galileo was tried not for being a heretic, but for publishing a book he'd earlier promised not to publish without church approval.
In any case, the church was far less the source of Galileo's problems than his fellow academic colleagues, who were envious and resentful of his encroachment on their areas of "expertise" -- namely, their theories dependent on the Ptolomaic system.
It was they, the university academics, who goaded the church into finally taking action; the church was initially reluctant to take issue with Galileo.