问题描述
从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'