Arnon Milchan and Warren Beatty have settled their two-year legal battle over the disastrous release of “Rules Don’t Apply,” Beatty’s period drama about Howard Hughes.

Milchan’s attorneys have filed a notice with the court dismissing his suit against Beatty. Terms of the settlement were not disclosed.

Milchan’s company, New Regency, sued Beatty and other investors in December 2017, alleging that they had failed to pay $18 million in distribution costs. Milchan alleged that Beatty and his investors ignored poor test screening results and insisted on a wide release for the film, rejecting advice from New Regency to do a more limited release. When the film flopped — grossing just $3.9 million — Milchan alleged that he was left holding the bag.

Beatty and his investors — including Steve Bing, Brett Ratner and Ron Burkle — countered that Milchan had failed to properly market the film. They alleged in a countersuit that Milchan had fallen asleep during an early screening, and was more interested in other films and Israeli politics than in doing the marketing job he had committed to do.

The dispute was laid bare in a vast trove of documents, including deposition transcripts, emails from Beatty pleading his case for the film, and results of the test screenings, in which audiences complained that Beatty’s portrayal of Hughes was “frustrating,” “disturbing” and “boring.” Yariv Milchan, Arnon’s son, alleged that Beatty had complained that the test audience was “too ethnic.” Beatty’s attorney, Bert Fields, disputed that claim. Yariv Milchan also alleged that Beatty had relied instead largely on the adulatory feedback of friends and family. As the release neared, Fox and New Regency found little audience awareness of the film.

“One possibility discussed was that the public was just not interested in the film, its stars or its subject matter,” Yariv Milchan stated.

The film cost $31.1 million to produce and another $23.2 million to distribute, including a costly awards campaign. Milchan alleged that Beatty and the other investors had reneged on a guarantee to recoup Milchan’s distribution costs.

Over the last year, Milchan reached confidential settlements with seven other investors: Ratner, Burkle, Bing, Terry Semel, Sybil Robson Orr, William D. Johnson and Jeffrey Soros. The only investor who has not yet reached terms with Milchan is Worldview Entertainment, led by Sarah Johnson.