when checking the gradle environment piece by piece, I found the following empty properites in ~/.gradle/gradle.properties:
systemProp.http.proxyHost=
systemProp.http.proxyPort=
systemProp.http.nonProxyHosts=
systemProp.https.proxyHost=
systemProp.https.proxyPort=
systemProp.https.nonProxyHosts=
After remove these properties, the build scan could work well now.