gpt4 book ai didi

android - 更新到 Android Studio 2.3 Canary 3 后 Gradle 构建失败

转载 作者:IT老高 更新时间:2023-10-28 22:25:16 26 4
gpt4 key购买 nike

我最近将我的项目的 android studio 版本从 2.3 Canary 2 更新到 2.3 Canary 3。从那时起,gradle 构建每次都失败并出现此错误:

Error:Unable to find method 'org.gradle.api.tasks.Sync.getInputs()Lorg/gradle/api/internal/TaskInputsInternal;'. 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.

我搜索了谷歌并没有找到这样的解决方案,但类似的解决方案不起作用。有人知道怎么解决吗?

最佳答案

解决方案是在构建 gradle 面板中选择“使用默认 gradle 包装器(推荐)”选项,如下图所示。现在您可以使用 gradle 3.2(在您的 gradle-wrapper.properties 中)和 android gradle:2.3.0-alpha3 或 beta1 作为编写时间

enter image description here

如果您在使用 File -> Invalidate Cache/Restart

时遇到问题,请不要忘记使缓存无效

关于android - 更新到 Android Studio 2.3 Canary 3 后 Gradle 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41116687/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com