In this paper, we investigate the spreading phenomena of the general nonlocal KPP equation in almost periodic media(⁎)ut=∫Ru(t,x−y)dμ(y)−u+a(x)u(1−u)t>0,x∈R, where μ is a probability measure on R and a is a positive almost periodic function with infx∈Ra(x)>0.Two constants ω+ and ω− are called the spreading speeds of (⁎) in the positive and negative directions respectively provided the following two statements hold:(i) For any nonnegative initial function u0∈L∞(R)∩C(R) with a compact support, limt→+∞supx≥(ω++ϵ)t|u(t,x)|=limt→+∞supx≤(−ω−−ϵ)t|u(t,x)|=0,∀ϵ>0;(ii) There is some L>0 such that for any nonnegative initial function u0∈L∞(R)∩C(R), if u0(x)>0 on an interval longer than L, thenlimt→+∞sup(−ω−+ϵ)t≤x≤(ω+−ϵ)t|u(t,x)−1|=0,∀ϵ>0.In this paper, we show that if the heterogeneity of the media can be averaged by the diffusion, then (⁎) has spreading speeds. Precisely, let E1 be the support of μ, E be the closed additive subgroup generated by E1∪{0} and H(a,S):={a(⋅+s)|s∈S}‾, we have the following theorem: Theorem 0.1Let a be an almost periodic function withinfx∈Ra(x)>0. Then(⁎)has spreading speedsω+andω−providedH(a,E)=H(a,R). We also give another description of this result by analyzing the basis of frequencies of a.Let {βk}k=1N,N∈Z+∪{∞} be an at most countable set of real numbers. Suppose that for any q=(q1,⋯,qn)∈Qn∖{0}, ∑k=1nqkβk≠0 for any n∈Z+ and n≤N. SetA={r|∃n∈Z+,q=(q1,⋯,qn)∈Qnwith qn≠0 s.t.r∑k=1nqkβk2π∈Q}.Theorem 0.2If the support of μsptμ⊄rZfor anyr∈A, then for any almost periodic function a withinfx∈Ra(x)>0and{βk}k=1Nbeing a basis of frequencies of a,(⁎)has spreading speeds.Ifsptμ⊂rZfor somer∈A, then there is some almost periodic function a withinfx∈Ra(x)>0and{βk}k=1Nbeing a basis of frequencies of a such that(⁎)has no spreading speeds. As the main tools in this paper, we also develop the theory of generalized principal eigenvalues and the homogenization method for nonlocal diffusion problems.