question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execution failed for task `:app:transformClassesWithMultidexlistForDebug`

See original GitHub issue

I am getting error after adding this package. `FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:app:transformClassesWithMultidexlistForDebug’.

com.android.build.api.transform.TransformException: Error while generating the main dex list.`

My android.defaultConfig has multiDexEnabled true. And dependencies { classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.google.gms:google-services:4.0.1'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
dineshmm23commented, Mar 18, 2019

Problem is with com.android.support:design not trageting to latest… i hope this can be fixed currently by

adding this line to ./android/build.gradle(module) not app

//Ensure that all dependencies use the same version of the Android Support library

subprojects {
    subproject ->
    afterEvaluate{
        if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
   project.configurations.all {
       resolutionStrategy.eachDependency { details ->
           if (details.requested.group == 'com.android.support'
                   && !details.requested.name.contains('multidex')) {
               details.useVersion "${rootProject.ext.supportLibVersion}"
           }
       }
   }
}

0reactions
okb1100commented, Feb 25, 2019

@ntgussoni and anyone who’s having the same error; I had the same error and I got my project to compile by adding implementation 'com.android.support:design:27.1.0' inside app/build.gradle dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - :app:transformClassesWithMultidexlistForDebug FAILED
After all this, I still get the following error. Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > com.android.
Read more >
Execution failed for task ':app ...
Go to android/app/build.gradle - in defaultConfig { add multiDexEnabled true in the end. If this doesn't work please post your build.
Read more >
app:transformClassesWithMultidexlistForDebug'. > com ...
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > com.android.build.api.transform.TransformException: Error while ...
Read more >
How to fix "Execution failed for task ':app ... - GeeksforGeeks
So, In this article, we will discuss 6 different methods for fixing the “Execution failed for task ':app:transformClassesWithDexForRelease” ...
Read more >
Android build is failing due to exception Execution failed for task
Hi,. I'm getting exception while building android application. Please find the error below : [exec-shell] Execution failed for task ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found