commons-logging defines classes that conflict with classes now provided by Android after Android Studio Update

前端 未结 8 1859
别跟我提以往
别跟我提以往 2020-12-01 13:34

I have updated Android Studio to version 3 and now seems unable to compile my project previously compiled without errors.

The error message is the follow

8条回答
  •  -上瘾入骨i
    2020-12-01 14:07

    I removed commons-logging as suggested above, of course it crashed on some phone with Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory;. How can Android claim the commons-logging is conflicting with Android API when the Android API doesn't contain any of those classes?!? There is no org.apache.commons.logging at https://developer.android.com/reference/packages :facepalm:

    I've added back implementation 'commons-logging:commons-logging:1.0.4' to the build.gradle - Android Studio underlines it with red but gradle compiles happily. :facepalm:

    Android :triple_facepalm:

提交回复
热议问题