Android Studio 疑难杂症 - Unable to find method ‘org.gradle.api.tasks.TaskInputs.property(Ljava/lang/Str

今天换台mac编译一个项目,突然 android studio 抽风编译不过

Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

是 kotlin 版本有些低,从 1.3.10 升级到 1.3.72 这个错误就没有了…
然后又报错

Unable to find method 'org.gradle.api.tasks.TaskInputs.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

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.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

最终是项目里用的 greendao 第三方库导致的,版本有点低,从 3.2.2 升级到 3.3.0 就好了。

关键另一台电脑就没出这样的问题,奇怪… 记录一下

你可能感兴趣的:(Android)