java - 任务“:app:javaPreCompileDebug”执行失败
问题描述
任务 ':app:javaPreCompileDebug' 执行失败。
无法解析配置“:app:debugAnnotationProcessorClasspath”的所有文件。找不到 com.google.bumptech.glide:compiler:4.12.0。在以下位置搜索:
- https://maven.google.com/com/google/bumptech/glide/compiler/4.12.0/compiler-4.12.0.pom
- http://jcenter.bintray.com/com/google/bumptech/glide/compiler/4.12.0/compiler-4.12.0.pom
- https://repo.maven.apache.org/maven2/com/google/bumptech/glide/compiler/4.12.0/compiler-4.12.0.pom
- https://dl.google.com/dl/android/maven2/com/google/bumptech/glide/compiler/4.12.0/compiler-4.12.0.pom
- https://jcenter.bintray.com/com/google/bumptech/glide/compiler/4.12.0/compiler-4.12.0.pom 要求:项目:app
可能的解决方案:
请任何人帮助我。在这两天里,我正在努力解决这个问题。使用最新版本的安卓。我更新了所有依赖项,还更改了存储库,但它不起作用。而且我还尝试添加一些依赖项和类路径,但它也不起作用。
My buil.gradle app level
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
//implementation 'com.google.android.material:material:1.4.0-alpha02'
//UI
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
implementation 'androidx.core:core-ktx:1.6.0-alpha01'
implementation 'androidx.work:work-runtime:2.7.0-alpha02'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androix.cardview:cardview:1.1.0'
implementation 'androidx.appcompat:appcompat-resources:1.2.0'
// Github
implementation 'com.google.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.google.bumptech.glide:compiler:4.12.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:24.0.0-beta1'
//noinspection GradleCompatible
implementation 'com.android.support:support-fragment:26.1.0'
// ButterKnife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// Firebase
implementation 'com.google.firebase:firebase-core:18.0.3'
implementation 'com.google.firebase:firebase-database:19.7.0'
implementation "com.google.firebase:firebase-firestore:22.1.2"
implementation platform('com.google.firebase:firebase-bom:26.8.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth:20.0.4'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:23.1.1'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:23.1.1'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
// implementation 'com.google.android.gms:play-services-maps:17.0.0'
/* implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
// If you are using Places, add all of the dependencies below
implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.auto.value:auto-value-annotations:1.6.5'
implementation 'com.google.maps.android:android-maps-utils-v3:2.2.0'*/
// Room components
/* implementation "androidx.room:room-runtime:2.2.6"
annotationProcessor "androidx.room:room-compiler:2.2.6"
androidTestImplementation "androidx.room:room-testing:2.2.6"*/
// Lifecycle components
//noinspection GradleDependency
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
//noinspection LifecycleAnnotationProcessorWithJava8
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.4.0-alpha01"
// Testing
androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion"
}
'这是我的顶级 build.gradle'
buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
}
}
allprojects {
repositories {
maven {
url "https://maven.google.com" //"http://repo1.maven.org/maven2"
}
jcenter {
url "http://jcenter.bintray.com/"
}
mavenCentral()
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
roomVersion = '2.2.5'
archLifecycleVersion = '2.2.0-rc03'
coreTestingVersion = '2.1.0'
materialVersion = '1.2.1'
}
解决方案
推荐阅读
- javascript - 在客户端执行过滤并在服务器端进行搜索
- java - 从 SCDF 启动任务时如何解决执行“java.lang.IllegalArgumentException: Invalid TaskExecution, ID 3”?
- swift - 过滤 Firebase 数据 SwiftUI
- apache-royale - apache Royale 现在支持双向数据绑定吗?
- html - 注册后欢迎电子邮件中的添加到日历按钮
- javascript - 不起作用,Javascript 在单击按钮之前验证文本输入
- shell - 是否有任何 Dart 资源可以将命令行字符串拆分为列表
论据? - amazon-web-services - AWS S3 CLI 在使用 mv 命令时创建多个目录
- javascript - 如何将表单变量和画布图片发送到 php 服务器?
- java - Hamcrest 检查值是否为空或空数组