Android Gradle无法找到方法"org.grade.api.internal.file.DefaultSourceDirectorySet" [英] Android gradle unable to find method 'org.grade.api.internal.file.DefaultSourceDirectorySet'

查看:53
本文介绍了Android Gradle无法找到方法"org.grade.api.internal.file.DefaultSourceDirectorySet"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Java类转换为Kotlin,除出现以下错误外,它工作正常,我尝试重新下载以下建议的所有依赖项,但无济于事,请帮助我解决此错误.

I tried to convert a java class to Kotlin, which worked Ok except I got the following error.I tried to re download all dependencies like suggessted in the below, but to no avail.Please help me with this error.

错误:

Error:(2, 0) Unable to find method 'org.gradle.api.internal.file.DefaultSourceDirectorySet.<init>(Ljava/lang/String;Lorg/gradle/api/internal/file/FileResolver;)V'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>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.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

推荐答案

尝试在build.gradle中更新kotlin版本.

Try to update kotlin version in build.gradle.

ext.kotlin_version = '1.3.72'

这篇关于Android Gradle无法找到方法"org.grade.api.internal.file.DefaultSourceDirectorySet"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆