05月26, 2020

flutter打包报错 Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

FAILURE: Build failed with an exception.                                

* 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-540786dd51f112885a89792d678296b95e6622e5.
     Required by:                                                       
         project :app                                                   
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
   > Could not resolve io.flutter:x86_debug:1.0.0-540786dd51f112885a89792d678296b95e6622e5.
     Required by:                                                       
         project :app                                                   
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
   > Could not resolve io.flutter:x86_64_debug:1.0.0-540786dd51f112885a89792d678296b95e6622e5.
     Required by:                                                       
         project :app                                                   
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error     

解决方法:

修改文件:flutter/packages/flutter_tools/gradle/resolve_dependencies.gradle
url "http://download.flutter.io" 
修改文件:flutter/packages/flutter_tools/gradle/flutter.gradle
private static final String MAVEN_REPO = "http://download.flutter.io";

本文链接:http://zzl.bzpwhite.cn/post/flutter打包报错.html

-- EOF --

Comments