欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

问题记录-Unable to find method ‘org.gradle.api.tasks.TaskInputs...’

程序员文章站 2022-07-04 08:27:54
问题描述从SVN拉下工程后用AS打开,编译提示如下:Unable to find method ‘org.gradle.api.tasks.TaskInputs...’Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.问题产生的原因...

问题描述

从SVN拉下工程后用AS打开,编译提示如下:

Unable to find method ‘org.gradle.api.tasks.TaskInputs...’
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

问题产生的原因

您的项目可能使用的第三方插件与该项目中的其他插件或该项目要求的Gradle版本不兼容,而我的项目build.gradle中只有两项:

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
    }

所以真相只有一个“greendao-gradle-plugin”这个插件需要升级

解决方案

1、项目build.gradle中将升级至最新版本:

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'

2、App模块build.gradle中greendao版本升级至最新版本:

implementation 'org.greenrobot:greendao:3.3.0'

本文地址:https://blog.csdn.net/gongwei628/article/details/108844293