gpt4 book ai didi

android - studio 更新后出现 Gradle 错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:55:30 25 4
gpt4 key购买 nike

我最近从 1.2.2 升级到 1.3.2 并出现以下错误:

错误:无法加载类“org.gradle.api.publication.maven.internal.DefaultMavenFactory”。

Possible causes for this unexpected error include:

  • You are using JDK version 'java version "1.7.0_79"'. Some versions of JDK 1.7 (e.g. 1.7.0_10) may cause class loading errors in Gradle. Please update to a newer version (e.g. 1.7.0_67).

    Open JDK Settings

  • 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.

如果这很重要,我的项目正在使用 SquiDB 库,有没有人遇到过类似的错误并且可以帮助我解决问题?

最佳答案

我不知道为什么,但以下是有效的:

打开设置面板

转到构建、执行、部署>构建工具> Gradle

Project-level settings 标题下的表单右侧选择 Use default gradle wrapper (Recommended)

在我的例子中,出于某种原因我选择了Use local gradle distribution

如果您知道问题背后的原因和应用的解决方案,请添加另一个答案和解释,我会接受它。

关于android - studio 更新后出现 Gradle 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32220047/

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