Einstein equations are derived for D-dimensional space-time that spontaneously compactify to the product M 4 × Π i = 1 α M d i in which the metric is taken to be of the generalized Robertson-Walker form. Cosmological solutions for these equations are studied with power law, oscillatory and exponential behaviour for the D-dimensional Einstein-Maxwell, N = 2, D = 10 and N = 1, D = 11 supergravity models. In the Einstein-Maxwell case the presence of a cosmological constant forces the extra dimensions to be static. Nevertheless, it is possible to find solutions with vanishing effective 4 dimensional cosmological constant with an expanding 4-dimensional space-time. In the supergravity models the requirement of having compact extra dimensions restricts the solutions to have expansion only in the 4-dimensional space-time. Matter contribution is added to the energy-momentum tensor in an attempt to find new solutions.