-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desugaring and AGP version related crash #115
Comments
@mattmook : Pls help me with this as soon as you can. We cannot rollout to a wider audience because of this issue. |
@mattmook - This is super important to us and our subsequent releases. Pls let me know if there is any quick fix that can be adopted, without going thru the heavy-duty upgrades. |
@mattmook - Pls help me with this issue, We have disabled CT on 5/6/7 for now. But we want to enable it back again, which requires fixing this asap. Pls help |
@mattmook - Pls respond! |
from a point of view of removing dependency on desugaring it requires rewriting any code that uses features of Duration that don't exist on earlier versions of Android. It's certainly possible, but a complete pain. |
@mattmook IMPORTANT
I am on v2.4.0 of the appmattus/certificateTransparency library.
We use Android Gradle plugin v7.4.2 and
With the above configuration - the app crashes on Android versions 5/6/7 with ClassNotFoundException as follows:
Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration; at o.onStartNestedScroll.<clinit>(SourceFile:137) at o.onNestedScroll.valueOf(SourceFile:127) at o.onNestedScroll.InstrumentAction(SourceFile:119) at o.isMatchConstraintEqualityCandidate$Instrument.valueOf(SourceFile:16)
The java.time package used in the LogListCacheManagementDataSource class is the root cause
I found out that not having the desugaring dependency has caused this issue and hence added the desugaring dependency as follows:
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
Post this, the app started crashing with another exception as shown below:
On further debugging, I found the below 2 links -
Google Issue Tracker
AGP fix changelog: https://developer.android.com/studio/releases/fixed-bugs/studio/2022.3.1#android-studio-giraffe-canary-11-2022.3.1.11
The crash is related to Desugaring version incompatibility with the AGP version we use. The solution seems to be hinting towards upgrading AGP to 8.1.0+. But this involves a major upgrade of Android 17 as well, increasing the scope of the fix.
Is there any easier way to solve for this crash without having to do all these upgrades? Pls let us know.
The text was updated successfully, but these errors were encountered: