Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Didn't find class "java.lang.Math8" on path: DexPathList

After migrating the Gradle version to 7.2, I get this error when running the application. I noticed that it's pointing to Java 8 date/time feature, LocalDate. My project already has coreLibraryDesugaringEnabled = true enabled.

like image 260
Amir Avatar asked Oct 19 '25 12:10

Amir


2 Answers

After lots of searches without any result, I noticed only a simple solution as updating the coreLibraryDesugaring version will solve the problem. upgrading from 1.1.1 to 1.1.5. Hope this saves you some time!

like image 144
Amir Avatar answered Oct 21 '25 02:10

Amir


Can confirm that Amir's answer solved this for me. Under dependencies, bump to this: coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

like image 44
Vallle Avatar answered Oct 21 '25 02:10

Vallle