Ryan Gosling is set to star as Ken in the 'Barbie' movie.

The 40-year-old actor is in talks to co-star with Margot Robbie, 31, in the live-action movie about Mattel, Inc's iconic doll, according to The Hollywood Reporter.

Greta Gerwig and Noah Baumbach have written the script for the Warner Bros movie, with Gerwig attached to direct.

Robbie will produce the movie via her LuckyChap production company alongside her husband, LuckyChap’s Tom Ackerley.

Mattel Films’ Robbie Brenner and Paddington’s David Heyman will also produce.

Ryan was previously offered the role during the summer but turned it down due to a scheduling conflict.

However, due to a delay in filming, he is now free to take on the part.

Margot previously vowed to give audiences "something totally different" to what they would expect from the famous Mattel doll.

Margot said last year: "Something like Barbie where the IP, the name itself, people immediately have an idea of, 'Oh Margot is playing Barbie, I know what that is', but our goal is to be like, 'Whatever you're thinking, we're going to give you something totally different – the thing you didn't know you wanted.'"

Margot's producing partner Josey McNamara added that the acclaimed duo will help change viewers' expectations of the project.

He explained: "As Margot said, you think you know what the movie is with Margot as Barbie, but Greta and Noah have subverted it, and we can't wait to get into that one."

The film centres on Barbie being expelled from Barbie Land for failing to live up to the expectations of its residents and Robbie hopes that it will put some "positivity out in the world".

She previously said: "I think it's a great opportunity to put some positivity out in the world and a change to be aspirational for younger kids."