每次我尝试运行项目时都会收到此错误。我以为是因为multidex,所以我启用了multidex。但是它没有解决。然后,我检查了此link。尝试了接受的答案。但是问题仍然没有解决。如何检查该org.apache.commons.logging.Log
的实现方式?我要附加应用程序的build.gradle和root build.gradle文件。
/// root build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
ext {
supportLibVersion = "28.0.0"
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
/// app's build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.myapp"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion "${supportLibVersion}"
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
implementation "com.android.support:design:${supportLibVersion}"
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
//implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation ('com.github.bumptech.glide:glide:4.8.0') {
exclude group: "com.android.support"
}
implementation 'com.github.orangegangsters:swipy:1.2.3@aar'
implementation 'com.karumi:dexter:5.0.0'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
implementation 'com.opencsv:opencsv:4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.4' //17.3.4
implementation 'com.google.firebase:firebase-core:16.0.7' //16.0.7
//implementation 'com.google.android.gms:play-services:17.3.4' //10.2.0
implementation 'com.google.android.gms:play-services-auth:16.0.1' //16.0.1
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
}
apply plugin: 'com.google.gms.google-services'