8. Given that $a$ is a natural number, the number of integer solutions to the inequality
$$
a^{2} x^{4}-\left(a^{4}+1\right) x^{2}+a^{2}<0
$$

is ( ) .
(A) $2 a-2$
(B) $2 a-1$
(C) $2 a$
(D) $2 a+1$
8. (A).

The inequality is $a^{2}\left(x^{2}-a^{2}\right)\left(x^{2}-\frac{1}{a^{2}}\right)<0$,
which gives $\frac{1}{a^{2}}<x^{2}<a^{2}$.
Thus, $-a<x<-\frac{1}{a}$ or $\frac{1}{a}<x<a$.
The integer solutions are $-a+1,-a+2, \cdots,-1,1, \cdots, a-2, a-1$, a total of $2 a-2$ solutions.