java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory : <p>Similar questions have need asked already. But this one seems to be more complicated than previous ones because of changes in compatibility of Android Platforms.</p>

<p>Here is my error log from Pixel and Pixel2 which are signed up for Android Beta Program</p>

<pre><code>08-16 13:20:53.146 9630-9630/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: me.project.android.dev, PID: 9630
    java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory;
        at com.amazonaws.util.VersionInfoUtils.&lt;clinit&gt;(VersionInfoUtils.java:41)
        at com.amazonaws.util.VersionInfoUtils.c(VersionInfoUtils.java:77)
        at com.amazonaws.ClientConfiguration.&lt;clinit&gt;(ClientConfiguration.java:43)
        //project specific class reference removed
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.logging.LogFactory" on path: DexPathList[[zip file "/data/app/me.project.android.dev-0SPRJnc8-4voauRU7Y20zQ==/base.apk"],nativeLibraryDirectories=[/data/app/me.project.android.dev-0SPRJnc8-4voauRU7Y20zQ==/lib/arm64, /data/app/me.project.android.dev-0SPRJnc8-4voauRU7Y20zQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.amazonaws.util.VersionInfoUtils.&lt;clinit&gt;(VersionInfoUtils.java:41) 
        at com.amazonaws.util.VersionInfoUtils.c(VersionInfoUtils.java:77) 
        at com.amazonaws.ClientConfiguration.&lt;clinit&gt;(ClientConfiguration.java:43) 
        //project specific class reference removed
        at android.os.Handler.handleCallback(Handler.java:873) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6669) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
</code></pre>

<p>Same code when ran on Devices running Android 7.0 and below, it works perfectly fine.</p>

<p>I tried adding dependency to my project too</p>

<pre><code>implementation "commons-logging:commons-logging:1.2"
</code></pre>

<p>Adding this dependency makes the app work in Pixel and Pixel but then it crashes in all other devices with Exception saying </p>

<pre><code>org.apache.commons.logging.impl.LogFactoryImpl does not extend or implement org.apache.commons.logging.LogFactory
</code></pre>

<p>I tried doing all the changes in ProGuard already. Here is my proguard configuration</p>

<pre><code>-keep class org.apache.commons.logging.impl.LogFactoryImpl
-keep class org.apache.commons.logging.LogFactory
-keepnames class org.apache.commons.logging.impl.* {*;}
-keepnames class org.apache.commons.logging.*
-keepclassmembers class org.apache.commons.logging.impl.* {*;}
-keepclassmembers class org.apache.commons.logging.*
-keepnames interface org.apache.commons.logging.impl.* {*;}
-keepnames interface org.apache.commons.logging.*
</code></pre>

<p>Still causing the crash.</p>

<p>This issue is related to Amazon AWS SDK - <a href="https://github.com/aws/aws-sdk-android/issues/476" rel="noreferrer">https://github.com/aws/aws-sdk-android/issues/476</a></p>

<p>Is there any workaround till AWS updates their SDK to fix this issue?</p>
