Karumi / Dexter

Android library that simplifies the process of requesting permissions at runtime.
http://karumi.com
Apache License 2.0
5.23k stars 671 forks source link

Desugring error #268

Closed manishpatelgt closed 3 years ago

manishpatelgt commented 3 years ago

I am getting errors after enabling desugaring

Execution failed for task ':app:mergeExtDexRelease'.

Could not resolve all files for configuration ':app:releaseRuntimeClasspath'. Failed to transform dexter-6.2.1.aar (com.karumi:dexter:6.2.1) to match attributes {artifactType=android-dex, dexing-enable-desugaring=true, dexing-incremental-transform=false, dexing-is-debuggable=true, dexing-min-sdk=28, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. Execution failed for DexingNoClasspathTransform: C:\Users\Manish Patel.gradle\caches\transforms-2\files-2.1\eea8c86c50d861ec78d3f205285a54b0\jetified-dexter-6.2.1-runtime.jar. Error while dexing.

I added in build.gradle

coreLibraryDesugaringEnabled true

and

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'

pedrovgs commented 3 years ago

Hi @manishpatelgt I'm afraid we are not going to support this for now. I'm going to mark this issue as a bug with the tag help_wanted just in case any external contributor would like to take a look.

manishpatelgt commented 3 years ago

OK @pedrovgs thanks for your replied

javimolla commented 3 years ago

Hi @manishpatelgt, could you share some project to reproduce the error? Because I created a new project, added Dexter as a dependency, and enabled desugaring, with no problems either running it or generating the apk

Here's the repo, if you want to check it out, but it's a simple Android Studio project

pedrovgs commented 3 years ago

I'm closing the issue until we have a reproducible example. Thank you so much @javimolla 😃