gpt4 book ai didi

android - 错误 :Cause: unable to find valid certification path to requested target

转载 作者:IT王子 更新时间:2023-10-28 23:47:06 25 4
gpt4 key购买 nike

当我同步 gradle 时,我在 android Studio 2.2.3 中遇到以下错误。

错误:原因:无法找到请求目标的有效认证路径

我该如何解决这个问题

我也在添加我的 Gradle 文件

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.sample.myapplication"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} } dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:palette-v7:23.4.0'
testCompile 'junit:junit:4.12'
// FireBase
compile 'com.google.firebase:firebase-messaging:9.0.0'
}//Add this line
apply plugin: 'com.google.gms.google-services'

和项目级别的 Gradle 文件

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
mavenCentral()
jcenter{ url "http://jcenter.bintray.com/" }
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

此问题可能是由于某些 Internet 连接受限...如果您在某些受限网络上安装构建工具,则可能无法安装所需的证书...因此请尝试更改网络连接...。为我工作.....

关于android - 错误 :Cause: unable to find valid certification path to requested target,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42415666/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com