Chosen Solution

I have a macbook air 11” early 2014 and when I use my earphones or any other earphone it doesnt make a sound but when I plug In a charger it makes a static sound. Also, i bought a keyboard and when i charge it does not work Any solutions?

This seems to point to a faulty I/O board where you have power input and part of audio circuitry. First thing you may want to try it’s a replacement, board and relevant connecting flat cable are relatively cheap and the job may be done on a DIY basis too. Don’t forget to disconnect battery before working on the board. Here you find a guide to help you with the job: MacBook Air 11" Early 2014 I/O Board Replacement