In this paper, we prove index theorems for integrable metrized line bundles on projective varieties over complete fields and number fields respectively. As applications, we prove a non-archimedean analogue of the Calabi theorem and a rigidity theorem about the preperiodic points of algebraic dynamical systems.