A, gradle. The properties
Variables are configured in gradle.properties, the project root directory, and the environment variable GRADLE_USER_HOME, the default path of gradle system directory XXX \user.gradle\gradle.properties, which has a higher priority
SystemProp, HTTP proxyHost = 127.0.0.1 fill in the IP proxy software, is usually the address
SystemProp. HTTP. ProxyPort = 10808 fill in the port agent software
The above configuration can meet most requirements, depending on whether the proxy software is friendly and supports HTTPS or SOCKS proxy. Other configurations are as follows:
SystemProp, HTTP proxyHost = 127.0.0.1
systemProp.http.proxyPort=10808
SystemProp. HTTPS. ProxyHost = 127.0.0.1
systemProp.https.proxyPort=10808
SystemProp. Socks. ProxyHost = 127.0.0.1
systemProp.socks.proxyPort=10808
Filtering agent
Can’t walk, agent for domestic warehouse and part of the network address can also don’t walk agent systemProp.http.nonProxyHosts=developer.huawei.com | maven.aliyun.com | 192.168. *
systemProp.https.nonProxyHosts=***
systemProp.socks.nonProxyHosts=***
2. Frequently asked Questions
Properly configure the agent, other warehouse can be down, but the following task error uploadCrashlyticsMappingFileGoogleRelease Connection timed out
org.apache.http.conn.HttpHostConnectException: Connect to firebasecrashlyticssymbols.googleapis.com: 443 / firebasecrashlyticssymbols.googleapis.com/172.217.27.138 failed: Connection timed out: connect
The solution
A task that filters exceptions (this is not recommended for debugging and relaese does not track error logs in Firebase)
` gradle.taskGraph.whenReady {
tasks.each { task ->
if (task.name.contains("uploadCrashlyticsMapping")) {
task.enabled = false
}
}
Copy the code
}
`
Modify gradle.properties configuration
Org. Gradle. Jvmargs = – DsocksProxyHost = 127.0.0.1 – DsocksProxyPort = 10808