I am new to Android Studio. My build compiles successfully until I try to generate a signed APK. Here is my current build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have looked at previous Stack Overflow answers and they all recommend putting the google() repository first, which I have done. I have also tried just adding "com.android.tools.lint:lint-gradle:27.1.1" to the dependencies section, but that has not worked.
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not resolve com.android.tools.lint:lint-gradle:27.1.1.
Required by:
project :app
> Could not resolve com.android.tools.lint:lint-gradle:27.1.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/27.1.1/lint-gradle-27.1.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/27.1.1/lint-gradle-27.1.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.lint:lint-gradle:27.1.1.
Any assistance is appreciated!
question from:
https://stackoverflow.com/questions/65904494/gradle-error-when-generating-signed-apk-in-android-studio 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…