Search code examples
androidgradleionic4capacitorionic-vue

Android Studio Gradle Build Error: Could not determine the dependencies of task ':app:compileFreeDebugJavaWithJavac'


Then on building or launhcing on my device i get following error:

Could not determine the dependencies of task ':app:compileFreeDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:freeDebugCompileClasspath'.
   > Could not resolve project :capacitor-android.
     Required by:
         project :app
      > No matching configuration of project :capacitor-android was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'minApi' with value '____free', attribute 'tier' with value 'free', attribute 'abi' with value 'x86' but:
          - None of the consumable configurations have attributes.

It is building my project using grable.

I have tried Build Clean, Build Rebuild and File > Invlaidate Caches and Resatrt as well.

Kindly help.


Solution

  • Installing jetifier solved my error by executing npm install jetifier

    Jetifier tool migrates support-library-dependent libraries to rely on the equivalent AndroidX package