Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Circular dependency in Android project

I am working on an app which is based on pjsua2 library. When i run the project on any version of android below Oreo, it works fine and I am able to debug the app. But when I try to debug it on my new handset which have android version Oreo, it give me the following error

Circular dependency between the following tasks:
:app:checkManifestChangesDebug
\--- :app:instantRunMainApkResourcesDebug
     \--- :app:transformClassesAndDexWithShrinkResForDebug
          \--- :app:transformDexArchiveWithDexMergerForDebug
               +--- :app:preColdswapDebug
           |        \--- :app:incrementalDebugTasks
           |                 +---:app:transformClassesAndClassesEnhancedWithInstantReloadDexForDebug
               |         |    \--- :app:transformClassesWithInstantRunForDebug
               |         |         \--- :app:checkManifestChangesDebug (*)
               |         \--- :app:transformClassesWithInstantRunForDebug (*)
               \--- :app:transformClassesWithDexBuilderForDebug 
                    +--- :app:preColdswapDebug (*)
                    \--- :app:transformClassesWithInstantRunForDebug (*)

(*) - details omitted (listed previously)

I think its due to the android version but I really need to solve this issue. So if someone can help, I will be very thankful

like image 935
Shr'Ma Dexterity Ratnesh Avatar asked Oct 22 '18 12:10

Shr'Ma Dexterity Ratnesh


1 Answers

I had actually the same problem and I found 2 ways to bypass this while waiting to have a real solution to fix this.

1) Disable instant run : -> Settings / Build, Execution, Deployment / Instant Run (uncheck "Enable Instant Run)

or

2) Disable shrinkResources if you have it set to true in the app level build.gradle

shrinkResources false

I am still looking for a better way to fix this...

like image 182
Hocine B Avatar answered Sep 23 '22 13:09

Hocine B