SAN FRANCISCO — Google gave Andy Rubin, the creator of Android mobile software, a hero’s farewell when he left the company in October 2014.

“I want to wish Andy all the best with what’s next,” Larry Page, Google’s chief executive then, said in a public statement. “With Android he created something truly remarkable — with a billion-plus happy users.”

What Google did not make public was that an employee had accused Mr. Rubin of sexual misconduct. The woman, with whom Mr. Rubin had been having an extramarital relationship, said he coerced her into performing oral sex in a hotel room in 2013, according to two company executives with knowledge of the episode. Google investigated and concluded her claim was credible, said the people, who spoke on the condition that they not be named, citing confidentiality agreements. Mr. Rubin was notified, they said, and Mr. Page asked for his resignation.

Google could have fired Mr. Rubin and paid him little to nothing on the way out. Instead, the company handed him a $90 million exit package, paid in installments of about $2 million a month for four years, said two people with knowledge of the terms. The last payment is scheduled for next month.