2. Let $A=(-2,4), B=\left\{x \in \mathbf{R} \mid x^{2}+a x+4=0\right\}$. If the number of non-empty subsets of $A \cap B$ is 1, then the range of real number $a$ is $\qquad$ .
2. $(-\infty,-5] \cup\{-4\} \cup(4,+\infty)$.

From the given information, $A \cap B$ contains exactly one element. Let $f(x)=x^{2}+a x+4$, and we will discuss the following cases.
(1) If $\Delta=a^{2}-16=0$, then $a= \pm 4$. However, when $a=4$, the root of $f(x)$ is $-2 \notin A$, so it should be discarded. On the other hand, $a=-4$ is verified to satisfy the condition.
(2) If $\Delta>0$, then according to the properties of the quadratic function graph, it must be that $f(-2) f(4) \leqslant 0$, i.e., $(8-2 a)(20+4 a) \leqslant 0$, solving which gives $a \geqslant 4$ or $a \leqslant-5$. However, $a=4$ should be discarded, and $a=-5$ is verified to satisfy the condition.
In summary, we have $a \in(-\infty,-5] \cup\{-4\} \cup(4,+\infty)$.