我是android studio的新手,今天完成了一个试图构建签名APK的项目,但遇到错误 我真的很努力地找到共鸣,但失败了
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all task dependencies for configuration ':app:lintClassPath'.
> Could not resolve com.android.tools.lint:lint-gradle:26.6.3.
Required by:
project :app
> No cached version of com.android.tools.lint:lint-gradle:26.6.3 available for offline mode.
> No cached version of com.android.tools.lint:lint-gradle:26.6.3 available for offline mode.
> No cached version of com.android.tools.lint:lint-gradle:26.6.3 available for offline mode.
* 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 FAILED in 1s
下面是应用程序构建部分,我不知道该由谁解决,请给出答案 还提到了原因,以便我可以从下面的应用程序构建部分中学习它:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.covid_19"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}}}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.blackfizz:eazegraph:1.2.5l@aar'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.leo.simplearcloader:simplearcloader:1.0.+'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
}
答案 0 :(得分:0)
在gradle中禁用离线模式并同步项目
答案 1 :(得分:0)
发生这种情况是因为您的Android Studio在离线模式下使用gradle。 请参阅以下解决方案:Keep order details in arrays?