The Avengers ( 2012 film ) was written by Josh Whedon .
The film was written and directed by Joss Whedon and features an ensemble cast that includes Robert Downey Jr. , Chris Evans , Mark Ruffalo , Chris Hemsworth , Scarlett Johansson , Jeremy Renner , Tom Hiddleston , Clark Gregg , Cobie Smulders , Stellan Skarsgård , and Samuel L. Jackson .
The Avengers -LRB-2012 film-RRB-