【问题标题】:How to fix error gradle with flutter 2019如何使用 Flutter 2019 修复错误 gradle
【发布时间】:2019-05-04 16:36:59
【问题描述】:
* Error running Gradle:
ProcessException: Process "C:\Users\chhor\Documents\flutterApps\helloplant\android\gradlew.bat" exited abnormally:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.2.1.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.2.1.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
               > Connect to 192.168.0.2:80 [/192.168.0.2] failed: Connection timed out: connect
      > Could not resolve com.android.tools.build:gradle:3.2.1.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
               > Connect to 192.168.0.2:80 [/192.168.0.2] failed: Connection timed out: connect
      > Could not resolve com.android.tools.build:gradle:3.2.1.
         > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
            > Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
               > Connect to 192.168.0.2:80 [/192.168.0.2] failed: Connection timed out: connect

* 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 1m 4s
  Command: C:\Users\chhor\Documents\flutterApps\helloplant\android\gradlew.bat app:properties


Please review your Gradle project setup in the android/ folder.

【问题讨论】:

    标签: flutter-test


    【解决方案1】:
    To solve this problem, add 
    
    maven {
        url 'https://dl.google.com/dl/android/maven2'
    }
    
    in the top of:
    
    jcenter()
    
    and it will give that :
    
    buildscript {
        repositories {
            google()
            maven {
                url 'https://dl.google.com/dl/android/maven2'
            }
            jcenter()
        }
    

    【讨论】:

      猜你喜欢
      • 2021-11-18
      • 1970-01-01
      • 2019-11-01
      • 2020-10-03
      • 2021-10-13
      • 1970-01-01
      • 2019-10-11
      • 2020-04-02
      • 2023-04-01
      相关资源
      最近更新 更多