I followed the Charles documentation
Android emulator In the Android emulator run configuration add an Additional Emulator Command Line Option: -http-proxy http://LOCAL_IP:8888
Where LOCAL_IP is the IP address of your computer, not 127.0.0.1 as that is the IP address of the emulated phone.
Also I installed the Charles certificate on the emulator. But still it doesn't work.
Charles seems to have been able to capture HTTP traffic from it but not HTTPs.