In this paper, we obtain the necessary and sufficient condition of the pre-compact sets in the variable exponent Lebesgue spaces, which is also called the Riesz-Kolmogorov theorem. The main novelty appearing in this approach is the constructive approximation which does not rely on the boundedness of the Hardy-Littlewood maximal operator in the considered spaces such that we do not need the log-Hölder continuous conditions on the variable exponent. As applications, we establish the boundedness of Riemann-Liouville integral operators and prove the compactness of truncated Riemann-Liouville integral operators in the variable exponent Lebesgue spaces. Moreover, applying the Riesz-Kolmogorov theorem established in this paper, we obtain the existence and the uniqueness of solutions to a Cauchy type problem for fractional differential equations in variable exponent Lebesgue spaces.