据我阅读有关类似问题的其他链接,总是存在 2 个库冲突的问题,我认为我也是这种情况,但谁能告诉我哪个库导致冲突或问题是什么?我该如何解决这个问题?下面是我的 Gradle,我的堆栈跟踪中只有这一行错误。任何帮助,将不胜感激。仅当我在此包中运行任何仪器测试时才会出现此错误,我将其他包作为库,并且所有这些测试都运行良好,但我无法在此包中运行任何仪器测试。
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: '../../extlibs/apache-common-csv', include: ['*.jar'])
implementation 'com.amazonaws:aws-android-sdk-core:2.16.0'
implementation 'com.amazonaws:aws-android-sdk-s3:2.13.7'
implementation('com.amazonaws:aws-android-sdk-mobile-client:2.16.0@aar') { transitive = true }
implementation('com.amazonaws:aws-android-sdk-auth-userpools:2.16.0@aar') { transitive = true }
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'org.apache.commons:commons-lang3:3.7'
implementation 'org.apache.commons:commons-io:1.3.2'
implementation 'com.opencsv:opencsv:4.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.room:room-runtime:2.2.5'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.paging:paging-runtime:2.1.2'
implementation 'androidx.paging:paging-rxjava2:2.1.2'
testImplementation 'org.json:json:20190722'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation project(path: ':roomdblib')
}