On my 5600 there are times when after I put a lens on the view screen says Lens not attached. Does not matter if it is a Nikon or Tamron Lens;
Sometimes it helps to release the lens and click on again - several times. If you say clean the contacts please tell ne how, and with what.
Thanks