能不能帮我解决下flutter启动项目时遇到的问题呢?试过很多方法了

新手上路,请多包涵

运行项目时总是在Resolving dependencies...报错,百度之后按教程将google()jcenter() 替换为阿里的之后也无济于事,错误信息为

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://maven.aliyun.com/repository/google/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
        > Could not GET 'https://maven.aliyun.com/repository/google/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
           > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  > Could not resolve com.android.tools.build:gradle:3.2.1.
     > Could not get resource 'https://maven.aliyun.com/repository/jcenter/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
        > Could not GET 'https://maven.aliyun.com/repository/jcenter/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
           > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  > Could not resolve com.android.tools.build:gradle:3.2.1.
     > Could not get resource 'http://maven.aliyun.com/nexus/content/groups/public/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
        > Could not GET 'http://maven.aliyun.com/nexus/content/groups/public/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
           > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

添加证书之后还是不行,请问这是我Java版本的问题吗?我安装的是jdk1.8.0_31.
谢谢!

阅读 7.9k
5 个回答
新手上路,请多包涵

同问,遇到相同的问题,公司可以,在自己家连的wifi笔记本上就老是报这个错,导入证书也还是一样

添加阿里源之前,要看看你设置过代理没有。如果设置过代理,换成阿里源也是没用的

看问题2

怎么处理的?同样遇到了

请问最后解决了,需要怎么处理

问一下解决了吗?这边也遇到了,就挺坑的,iOS没有问题,只有android有问题。很烦

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏