The present invention provides a resin composition containing the following (a) component and (b) component. (a) a polyimide precursor having a structural unit represented by the following general formula (1); (b) a compound represented by the following general formula (2).