java - 构建签名的apk时出错我该如何解决这个问题?
问题描述
我是 android studio 的新人,今天完成了一个项目,试图构建已签名的 apk,但出现错误我真的很努力地寻找 reson,但失败了
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'
}
解决方案
在 gradle 中禁用离线模式并同步项目
推荐阅读
- python - PYTHON 检查列数据集中的值是否在另一个数据集中报告的值范围内
- react-native - 警告:无法在未安装的组件(React Native、Expo、React Hooks)上执行 React 状态更新
- python - 如何使用 PyInstaller 在 MacOS 上使用 selenium/chrome webdriver 制作独立的 Python 可执行文件
- unity3d - 例外:IL2CPP.exe 没有正常运行!Unity 3D构建问题
- codeigniter - 使用 VUEJS 在 axios 上发布 Codeigniter3 403 错误
- google-cloud-platform - 有没有办法在 Google Cloud 笔记本实例中设置过度使用内存?
- javascript - 如何使用赛普拉斯存根模块功能?
- python-3.x - 如何通过服务器将文本生成的列表发送到客户端
- azure - 通过基于证书的服务主体凭据访问 Azure 存储;azure.identity 与 azure.common.credentials
- java - 在终端中运行 sbt 命令时出现错误“:”