Dold's theorem gives sufficient conditions for proving that there is no $G$-equivariant mapping between two spaces. We prove a generalization of Dold's theorem, which requires triviality of homology with some coefficients, up to dimension $n$, instead of $n$-connectedness. Then we apply it to a special case of Knaster's famous problem, and obtain a new proof of a result of C.\,T. Yang, which is much shorter and simpler than previous proofs. Also, we obtain a positive answer to some other cases of Knaster's problem, and improve a result of V.\,V. Makeev, by weakening the conditions.