The embodiment of the present invention discloses an electronic device. The electronic device is provided with a metal frame. The electronic device also includes an antenna feed point, an antenna ground, a feed branch, a ground branch, an antenna resonant arm, a variable capacitor, and a control circuit, the antenna resonant arm is a part after the metal frame is divided, the antenna feed point is set on the feed branch, the antenna resonant arm is provided with a first connection part and a second connection part, and the first connection part is arranged at the antenna resonator arm The first end, the second connecting part is arranged between the first end and the second end of the antenna resonant arm, the feeding branch is arranged between the second connecting part and the antenna ground, and the grounding branch is arranged at the first Between the connecting part and the ground of the antenna, a variable capacitor is arranged on the feeding branch, and the variable capacitor is arranged between the antenna feeding point and the second connecting part, and the control circuit is used to adjust the capacitance of the variable capacitor. Through the above disclosure, the technical solution provided by the present invention can take into account the bandwidth and efficiency of the antenna and keep the appearance of the metal frame of the whole machine consistent.