我有一个项目。当我在手机中通过android studio运行它时,它运行不正常。但是当我想通过Generate Signed APK
释放它时,android studio会向我显示此错误:
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not find lint-gradle.jar (com.android.tools.lint:lint-gradle:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.jar
> Could not find lint.jar (com.android.tools.lint:lint:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.1.3/lint-26.1.3.jar
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.1.3/lint-checks-26.1.3.jar
> Could not find lint-api.jar (com.android.tools.lint:lint-api:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/26.1.3/lint-api-26.1.3.jar
> Could not find lint-kotlin.jar (com.android.tools.lint:lint-kotlin:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-kotlin/26.1.3/lint-kotlin-26.1.3.jar
> Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.1.3/intellij-core-26.1.3.jar
> Could not find uast.jar (com.android.tools.external.org-jetbrains:uast:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.1.3/uast-26.1.3.jar
> Could not find kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.1.3/kotlin-compiler-26.1.3.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
这是我的build.gradle(Module)文件:
apply plugin: 'com.android.application'
android {
signingConfigs {
release_key {
keyAlias 'releas_alias'
keyPassword '123456'
storeFile file('C:/Users/mostafa/AndroidStudioProjects/Ati_school_teacher_android/app/relase_key_file.jks')
storePassword '123456'
}
}
compileSdkVersion 27
defaultConfig {
applicationId "com.example.atieh.ati_school_teacher"
minSdkVersion 17
targetSdkVersion 26
versionCode 13
versionName "7.0.21"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release_key
}
debug {
debuggable true
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:26.1.0'
implementation 'com.squareup.retrofit:retrofit:2.0.0-beta2'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
implementation 'com.alexzh:circleimageview:1.1.2@aar'
implementation 'com.daimajia.androidanimations:library:1.0.3@aar'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.squareup.okhttp:okhttp:2.4.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
implementation 'com.squareup.picasso:picasso:2.4.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.wefika:horizontal-picker:1.1.1'
implementation 'me.angrybyte.picker:picker:1.3.0'
implementation 'com.google.android.gms:play-services-location:9.6.1'
implementation 'com.airbnb.android:lottie:2.1.0'
implementation 'com.google.android.gms:play-services-maps:9.6.1'
implementation 'com.google.android.gms:play-services:11.4.0'
implementation 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'
// Optional, for RxJava2 adapter
implementation 'com.andrognito.patternlockview:patternlockview-reactive:1.0.0'
}
这是我的build.gradle(Project)文件:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我进行了很多搜索,但找不到任何解决方案。如何解决这个问题?