WAI
Status Update
Comments
di...@google.com <di...@google.com>
sg...@google.com <sg...@google.com> #2
Thank you for the report.
This looks related to DEX
files. Unfortunately there has to be an indirection. Would it be possible for you to introduce such an indirection (see
mi...@swiftkey.com <mi...@swiftkey.com> #3
I'm also having this problem, but can't access the internal google bug tracker. Could you please make the potential solution public? Thanks!
sg...@google.com <sg...@google.com> #4
Sorry about the links. The issue is actually not internal. The public links are
Description
Studio Build: 4.1.3 Version of Gradle Plugin: 4.1.3 Version of Gradle: 6.6.1 Version of Java: 8 OS: Windows 10
If you enabled core library desugering for the new gradle plugin and you use classes which will be touched by core library desugering inside the
onCreate
method of theApplication
class, you'll getjava.lang.NoClassDefFoundError
on Android 4.4.4 devices. On every device above api level 19, it will work.I've created a sample project you can download here:https://github.com/rzetzsche/CoreLibraryDesugeringCrashOnAndroidKitkat/
For Reference:
If I try to execute the following code on an Android 4.4.4 device
I'll get the folowing exception:
But if i wrap it in inside another class like this
and will execute it like this
It will run without a problem.
It seems like every interface or class, which is touched by the core library desugering and is used inside the
onCreate
method of the application will cause the crash, for example theIterable
interface.