失败:生成失败并发生异常(Flutter)

时间:2020-02-29 08:47:28

标签: android gradle flutter dependencies flutter-dependencies

在重新安装dart SDK之后,我尝试运行flutter应用程序,尽管已连接到Internet,但仍出现此错误。我已经有很长时间了。我尝试移除 应用插件:“ com.google.gms.google-services”,但似乎没有效果。我很茫然。 我尝试进行抖动清除,将通道从beta转换为稳定版本,再重新转换为beta,然后再次稳定版本,并使用api级别28重新安装sdk。所有这些都是在我使用Animator小部件遇到一些问题之后开始的,这与bloc有关。


* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
     Required by:
         project :app
         project :app > project :google_sign_in
         project :app > project :firebase_storage
         project :app > project :google_api_availability
         project :app > project :sqflite
         project :app > project :geolocator
         project :app > project :firebase_messaging
         project :app > project :path_provider
         project :app > project :cloud_firestore
         project :app > project :location_permissions
         project :app > project :image_picker
         project :app > project :firebase_auth
         project :app > project :firebase_core
      > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'https:/maven.google.com/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'https:/maven.google.com/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > URI does not specify a valid host name: https:/maven.google.com/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom
      > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/flutter_embedding_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
   > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
     Required by:
         project :app
      > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'https:/maven.google.com/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'https:/maven.google.com/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > URI does not specify a valid host name: https:/maven.google.com/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom
      > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/arm64_v8a_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
   > Could not resolve io.flutter:x86_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
     Required by:
         project :app
      > Could not resolve io.flutter:x86_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'https:/maven.google.com/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'https:/maven.google.com/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > URI does not specify a valid host name: https:/maven.google.com/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom
      > Could not resolve io.flutter:x86_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:x86_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:x86_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/x86_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
   > Could not resolve io.flutter:x86_64_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
     Required by:
         project :app
      > Could not resolve io.flutter:x86_64_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'https:/maven.google.com/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'https:/maven.google.com/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > URI does not specify a valid host name: https:/maven.google.com/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom
      > Could not resolve io.flutter:x86_64_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:x86_64_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset
      > Could not resolve io.flutter:x86_64_debug:1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.
         > Could not get resource 'http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
            > Could not GET 'http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1/x86_64_debug-1.0.0-c4229bfbbae455ad69c967be19aee3fadd6486e1.pom'.
               > Connection reset

* 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 56s
Finished with error: Gradle task assembleDebug failed with exit code 1

1 个答案:

答案 0 :(得分:0)

我怀疑与Flutter一起使用的是香草Dart SDK。

一个简单的修复方法是摆脱已安装的Dart SDK,然后重新安装Flutter。

或者,修复PATH环境变量将确保使用了SDK。