  The general solution of Einstein's gravity equation in $D$ dimensions for an
anisotropic and spherically symmetric matter distribution is calculated in a
bulk with position dependent cosmological constant. Results for $n$ concentric
$(D-2)-$branes with arbitrary mass, radius and pressure with different
cosmological constant between branes are found. It is shown how the difference
between the cosmological constant contributes to the effective mass of each
brane, and it is also shown that the equation of state for each brane
influences the dynamics of branes, which can be divided into eras according to
the dominant matter. This scenario can be used to model the universe in the D=5
case, which may presents a richer phenomenology than the current models. The
evolution law of the branes is studied, and the anisotropic pressure that
remove divergences is found. The Randall-Sundrum metric in an outside region in
the flat branes limit is also derived.
