Android Studio has a configuration for Server Certificates (This works for other IntelliJ platforms like PyCharm as well)
Go to File->Settings. In the IDE Settings section select Server Certificates
Myself I just selected the Accept Automatically check box, hit Apply and never had to deal with it. If you are worried about security, there is also the option to add them 1 at a time as they come up.
In my case I did this because I already had a *.google.com certificate configured as accepted, but I still got the popup. I suspect that the fingerprint changed and if I would have deleted and then accepted the error would have gone away, but I decided to just make it go away by selecting the check box.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…