Varney, of Clayton, Staffordshire, was charged with two counts of rape, which he denied. The charges have now been dropped because the Crown Prosecution Service has decided that there is no realistic prospect of conviction.
Outside court Varney said that he had been through a "horrendous ordeal".
He said: "This is not a time of celebration for me - quite simply, I should never have been charged and put through this horrendous ordeal.
"I will sadly never know the exact reasons for Hannah's actions.
"My anger and frustration is directed at the police and the CPS who have had overwhelming evidence from the outset that no crime was committed."
Varney, whose QC described the aborted prosecution as "terribly disturbing and distressing", said he had been looking forward to the facts of the case coming out at trial.
He added that he supported anonymity for those accused of sexual crimes such as rape.
He said: "It impacts future prospects and you are never allowed to fully move forward when the fact that you have been accused is one click away on Google.
"The pendulum has swung too far and fairness and balance needs to be restored so that the presumption of innocence is not completely eroded."
Stubbs' body was found at her parents' home six months after the attack was alleged to have taken place.
At the time her family criticised the university for not suspending her alleged attacker.
In a statement, her parents, Paul and Mandy Stubbs, who live near Stafford, thanked friends, family and police for their care and support over the past 19 months.
"Our overwhelming feeling is one of loss," they said.
"And we don't want what happened to Hannah to define her life or our memory of the kind and loving person that she was.
"Hannah had decided to study medicine, and later physiotherapy, after hearing a missionary doctor speak at our church about the 2010 earthquake in Haiti.
"She was very good at what she turned her hand to, and could have achieved anything."
Where to get help:
• Lifeline: 0800 543 354 (available 24/7)
• Suicide Crisis Helpline: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• Youthline: 0800 376 633
• Kidsline: 0800 543 754 (available 24/7)
• Whatsup: 0800 942 8787 (1pm to 11pm)
• Depression helpline: 0800 111 757 (available 24/7)
• Rainbow Youth: (09) 376 4155
• Samaritans 0800 726 666
• If it is an emergency and you feel like you or someone else is at risk, call 111.