David commanded to gather together the foreigners who were in the land of Israel; and he set masons to hew worked stones to build the house of God.
There can be no doubt whatever that David missed the significant point in the words of God to him through the prophet Nathan  (2 Samuel 7), in which it was certainly clear enough that God did not desire the erection of any earthly temple whatever.  David understood, of course, that he was commanded not to build it, which by any fair interpretation of the prohibition laid upon David would also have included the extensive preparations which David made to have it done, even commanding it most emphatically to be done by Solomon.  And upon the principle that any man does, what he commands others to do, David must be charged with violation of God's commandment in this particular.