【问题标题】:"PKIX path building failed" after updating to AS 3.3更新到 AS 3.3 后“PKIX 路径构建失败”
【发布时间】:2019-01-19 08:19:16
【问题描述】:

这是我在“构建”选项卡中得到的:

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve com.github.chrisbanes:PhotoView:2.3.0.
     Required by:
         project :app
      > Could not resolve com.github.chrisbanes:PhotoView:2.3.0.
         > Could not get resource 'https://jitpack.io/com/github/chrisbanes/PhotoView/2.3.0/PhotoView-2.3.0.pom'.
            > Could not GET 'https://jitpack.io/com/github/chrisbanes/PhotoView/2.3.0/PhotoView-2.3.0.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.github.yalantis:ucrop:2.2.2.
     Required by:
         project :app
      > Could not resolve com.github.yalantis:ucrop:2.2.2.
         > Could not get resource 'https://jitpack.io/com/github/yalantis/ucrop/2.2.2/ucrop-2.2.2.pom'.
            > Could not GET 'https://jitpack.io/com/github/yalantis/ucrop/2.2.2/ucrop-2.2.2.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

项目 build.gradle:

buildscript {
    repositories {
        jcenter()
        google()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.google.gms:google-services:4.2.0'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

【问题讨论】:

    标签: android android-studio ucrop


    【解决方案1】:

    所以解决方案是使用嵌入式 JDK,这是推荐的方式。

    文件→项目结构→SDK位置→使用嵌入式JDK

    【讨论】:

      猜你喜欢
      • 2020-06-17
      • 2019-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-16
      • 2018-10-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多