Second moment of the central values of Rankin--Selberg $L$-functions