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

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

然后在我的设备上构建或启动时出现以下错误:

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.

它正在使用 grable 构建我的项目。

我也尝试了 Build Clean、Build Rebuild 和 File > Invlaidate Caches 和 Resatrt。

请帮忙。

安装 jetifier 解决了我的错误 通过执行 npm install jetifier

Jetifier 工具迁移 support-library-dependent 库以依赖等效的 AndroidX 包