出现
Could not create task ‘:app:processDebugResources’.
Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle_core() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.

出现这个原因是 我从最新版android studio 换成了一个旧版本的Android studio

解决方法:
修改 gradle/wrapper/gradle-wrapper.properties
里的
distributionUrl=https://services.gradle.org/distributions/gradle-8.0-bin.zip

这里修改的是为
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip

解决这个问题思路是 从一个正常能Gradle sync项目拷贝这些配置内容到不能正常 sync项目

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注