In view of our recent experimental finding of self-restoration of p/n junctions in Ag-doped (Cd,Hg)Te after their electrical or thermal perturbation, we ask the question if, and if so, when can, a mixed electronic semiconductor/ionic conductor support a built-in electric field. The question is of interest because common p/n junctions are merely kinetically stabilized systems. We study the problem by deriving the thermodynamically stable states of mixed conductors. This shows that (1) as long as all components of a multicomponent system behave ideally, no stable concentration gradient and built-in field may exist; (2) a thermodynamically stable concentration gradient and thus a built-in field can exist in a multicomponent system, if at least one of its components behaves nonideally (and thus, from the Gibbs-Duhem relation, at least one additional component must behave nonideally, too); and (3) the likelihood of finding a thermodynamically stable concentration gradient increases with the number of components of the system. While the first of these results is intuitively obvious, the rigorous proof given here is necessary to deduce that actual observation of self-restoration of p/n junctions implies nonideal behavior of at least two of the mobile species in the system. We show that our results can be used to derive the built-in electric field for a given variation of activity coefficients of one or more of the mobile species and vice versa.