我更喜欢开发Android应用程序。 我需要一个标签式布局,并在我的Android项目中为选项卡式布局添加了设计库。 我得到了几个错误,共同的描述如下。
Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath':
Could not resolve com.android.support:design:26.1.0.
Could not resolve com.android.support:design:26.1.0.
Required by:
project :app
> Could not resolve com.android.support:design:26.1.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/design/26.1.0/design-26.1.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/support/design/26.1.0/design-26.1.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> unable to find valid certification path to requested target
模块:应用
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.naari.simpleApp"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
项目:AndroProject
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我应该怎么做才能修复它? 我浏览了this链接,但没有解决。 我在设置 - >服务器证书下没有证书。 有什么想法吗?