God did not forbid David from building a temple because He doesn’t dwell in houses. It is true that He doesn’t need a temple, and the thought that God doesn’t dwell in temples is found in the Bible (Acts 7:48; 17:24). That doesn’t preclude the construction of a temple in Israel to take the place of the tabernacle. However, it was not David who would build it. Later in the same chapter, God reveals that David’s son, Solomon, would build a temple for Him (1 Chronicles 17:10-12).
In 1 Chronicles 28, David, as an old man is speaking to the leaders of Israel. He tells them of the time when he thought to build the Lord a temple. David tells them,
“But God said to me, ‘You shall not build a house for My name, because you have been a man of war and have shed blood.’” (28:3)
If he is recounting the events of 1 Chronicles 17, why do we not find this statement in the former text? It is simple; 1 Chronicles 17 doesn’t record the entire conversation. David says God said this. Who are we to say otherwise? The absence of information in a text is not a contradiction.
There is no contradiction.
A response to 1001 Bible Contradictions.