A judge dismissed one of six criminal charges against the disgraced Hollywood mogul Harvey Weinstein on Thursday after prosecutors acknowledged that the lead detective in the case had committed a serious error: He had failed to tell them about a witness who cast doubt on one of Mr. Weinstein’s accusers.

The abrupt development, which occurred at a hearing in State Supreme Court in Manhattan, signaled a victory for Mr. Weinstein and raised questions about what impact the revelation might have on the broader indictment against him.

Mr. Weinstein, 66, was charged in May with raping one woman and forcing another, Lucia Evans, to perform oral sex on him. Ms. Evans, a marketing executive, had testified to a state grand jury that the forced sex act had occurred in 2004, during a casting meeting at the offices of Mr. Weinstein’s film company, Miramax, in Manhattan’s TriBeCa neighborhood.

But in a letter unsealed after Thursday’s hearing, prosecutors from the Manhattan district attorney’s office revealed that a friend of Ms. Evans had informed them in August that Ms. Evans had given her a different account of the incident. The friend, who was not identified, told prosecutors that Ms. Evans had said she willingly performed oral sex on Mr. Weinstein in exchange for the promise of an “acting job.”