7. If for any $x$, we have
$$
\sin ^{n} x+\cos ^{n} x \geqslant \frac{1}{n},
$$

then the maximum value of $n$ is $\qquad$
7.8.

Let $x=\frac{\pi}{4}$, then
$$
\begin{array}{l}
\sin ^{n} x+\cos ^{n} x=2\left(\frac{1}{\sqrt{2}}\right)^{n}=\frac{1}{2^{\frac{n-2}{2}}} \geqslant \frac{1}{n} \\
\Rightarrow n \geqslant 2^{\frac{n-2}{2}} .
\end{array}
$$

Notice that, $2^{\frac{9-2}{2}}>9$. Therefore, $n \leqslant 8$.
Also, by the formula $\left(\frac{a^{4}+b^{4}}{2}\right)^{\frac{1}{4}} \geqslant \frac{a+b}{2}$, we know $\sin ^{8} x+\cos ^{8} x \geqslant \frac{1}{8}$.