If you have not already done so, reset the camera using the instructions on the attached photo
Then, detach and reattach the lens, clean the contacts on both lenses and camera body where the lens is mounted with an eraser. Be careful to not allow residue to drop into the camera body. Bad communication between the lens and the camera can also cause of this error.
If unsuccessful, try a hard reset. remove the lens, memory card and battery, set the mode dial to M (manual), and switch the camera to the ON position. Allow the camera to sit idle for 30 minutes. Then, switch the camera to OFF, re install the battery, memory card and lens, switch it on and see if auto focus is restored .
Please keep in mind that my diagnosis & solutions provided are directly dependent on the accuracy of your description of the problem. As with any "do it yourself" fixes, success is a "team effort", since I can't see or touch the camera, and relies on the customer's manual dexterity and ability to follow the instructions well.If you require additional information, please use the Reply to Expert Tab to contact me. Click the ratings only after our exchange is complete and you are satisfied.
If you are satisfied that my answer is accurate or has been helpful, please do not forget to rate my answer OK, Good or Excellent.