在我们公司的代理后面,我无法启动Flutter项目。我无法运行gradle。
我在gradle.properties中设置了以下配置:
systemProp.http.proxyHost=http://my.company.com
systemProp.http.proxyPort=8080
systemProp.http.nonProxyHosts=127.0.0.1|localhost
systemProp.https.proxyHost=http://my.company.com
systemProp.https.proxyPort=8080
systemProp.https.nonProxyHosts=127.0.0.1|localhost
SSL加密流量将被解密。我们的代理服务器上有自签名证书。我找不到任何告诉Gradle我的certs.pem
文件路径的方法。
堆栈跟踪
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
Exit code 1 from: C:\Users\i01002704\Documents\Projects\Android\time_tracker\android\gradlew.bat app:properties:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.1.4.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.1.4.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
> http://my.company.com
> Could not resolve com.android.tools.build:gradle:3.1.4.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
> http://my.company.com
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.61.
Required by:
project :
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.61.
> Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.61/kotlin-gradle-plugin-1.2.61.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.61/kotlin-gradle-plugin-1.2.61.pom'.
> http://my.company.com
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.61.
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.61/kotlin-gradle-plugin-1.2.61.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.61/kotlin-gradle-plugin-1.2.61.pom'.
> http://my.company.com
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Finished with error: Please review your Gradle project setup in the android/ folder.