After a lengthy search, Steven Spielberg has found his male lead for his adaptation of “Ready Player One.”

Sources tell Variety that “Mud” star Tye Sheridan will star in Spielberg’s next pic, which will be distributed by Warner Bros.

“Me and Earl and the Dying Girl” star Olivia Cooke has already been cast in the female lead, and Ben Mendelsohn is also on board for a role.

The Warner Bros., Village Roadshow and DreamWorks release is based on the buzzy Ernest Cline book of the same name. Spielberg, Donald De Line, Dan Farah and Kristie Macosko Krieger will produce, with Bruce Berman serving as exec producer. Warner Bros. had no comment.

Cline’s novel, published in 2011, follows the rise of virtual-reality universe the Oasis, which humans living in the not-too-distant future begin to value above the real world. Zak Penn adapted the story for the screen.

Sheridan will play Wade Watts, a poor orphan from the “stacks” surrounding metropolitan Oklahoma who joins the Oasis.

Pic is slated to bow on March 30, 2018.

Sheridan broke out in Jeff Nichols’ “Mud,” holding his own opposite Matthew McConaughey, and has followed up that performance with roles in adult dramas including David Gordon Green’s “Joe” and Gillian Flynn’s “Dark Places.” He is set to play Cyclops in “X-Men: Apocalypse” this May.

He is repped by WME and Mosaic. The news was first reported by Deadline Hollywood.