项目构建报错Re-download dependencies and sync project (requires network) #4520
Unanswered
xiaoliang2
asked this question in
Q&A
Replies: 1 comment
-
建议直接用 Gradle Wrapper,避免因 Gradle 版本不一致导致无法构建的问题。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
项目使用的jdk17,gradle使用的项目推荐8.0.2,网上搜了一大堆试了很多办法,还是报错
`Unable to find method ''org.gradle.api.artifacts.result.ResolvedVariantResult org.gradle.api.artifacts.result.ResolvedComponentResult.getVariant()''.
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.`
Beta Was this translation helpful? Give feedback.
All reactions