Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'

前端 未结 11 816
抹茶落季
抹茶落季 2020-11-22 16:37

Good day. After updating google repository in AndroidStudio, I have an issue

> Error:Execution failed for task \':app:transformClassesWithJarMergingForDe         


        
相关标签:
11条回答
  • 2020-11-22 17:09

    Use project root in terminal like this:-/Users/rajnish/Desktop/RankProjects/ProjectCloud

    After that enter this command ./gradlew clean

    It will work.

    0 讨论(0)
  • 2020-11-22 17:13

    Open your system command prompt/terminal -> Go to your Project folder path (root project folder ) -> Execute following command : command :- gradlew clean or ./gradlew clean

    Make sure that all your gradle dependencies are of same version. -> Example :- your appcompat and recyclerview dependencies should have same version.

    -> Change your gradle dependencies to same version like :-

    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    

    -> Rebuild your project and it will work fine.

    0 讨论(0)
  • 2020-11-22 17:18

    There may be different reason for reported issue, few days back also face this issue 'duplicate jar', after upgrading studio. From all stackoverflow I tried all the suggestion but nothing worked for me.

    But this is for sure some duplicate jar is there, For me it was present in one library libs folder as well as project libs folder. So I removed from project libs folder as it was not required here. So be careful while updating the studio, and try to understand all the gradle error.

    0 讨论(0)
  • 2020-11-22 17:18

    I resolved the issue by double checking the "libs" directory and removing redundant jars, even though those jars were not manually added in the dependencies.

    0 讨论(0)
  • 2020-11-22 17:19

    AndroidStudio Menu:

    Build/Clean Project

    Update old dependencies

    0 讨论(0)
提交回复
热议问题