【发布时间】:2021-07-22 13:43:27
【问题描述】:
开始了一个新的空白模板项目,在添加了 draglinearlayout 依赖项之后,我开始遇到这些错误,而在添加这个依赖项之前,我运行了我的项目并且它运行良好。错误如下
任务“:app:checkDebugDuplicateClasses”执行失败。 执行 com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable 时发生故障 在模块 core-1.5.0-runtime (androidx.core:core:1.5.0) 和 support-v4-22.1.1-runtime (com.android.support:support -v4:22.1.1) 在模块 core-1.5.0-runtime (androidx.core:core:1.5.0) 和 support-v4-22.1.1-runtime (com.android.support :support-v4:22.1.1) 重复类 android.support.v4.app.INotificationSideChannel$Stub$Proxy 在模块 core-1.5.0-runtime (androidx.core:core:1.5.0) 和 support-v4-22.1.1-runtime (com.android .support:support-v4:22.1.1)
- 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
这是我遇到的错误
这是我的模块成绩文件
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.ujjwal.drag_and_drop"
minSdkVersion 19
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 'com.jmedeisis:draglinearlayout:1.1.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
【问题讨论】:
标签: java android android-studio kotlin