I replaced the file C:\Program Files\Android\Android Studio\jre\jre\lib\security>\cacerts with
C:\Program Files\Android\Android Studio\jre\jre\lib\security>\cacerts with the file from the jre %JAVA_HOME%\lib\security\cacerts (%JAVA_HOME%\lib\security\cacerts).
theThe certificates in the new cacerts file directed the android jre to go through the proxy server.