In this paper, we introduce the notion of "dynamical Gröbner bases" of polynomial ideals over a principal ring. As application, we solve dynamically a fundamental algorithmic question in the theory of multivariate polynomials over the integers called "Kronecker's problem," that is the problem of finding a decision procedure for the ideal membership problem for Z[X 1 , . . . , X n ]. The notions of Gröbner bases over Noetherian valuation rings and dynamical Gröbner bases over principal rings have applications in error correcting codes.