简介: CSDN博客专家、《Android系统多媒体进阶实战》一书作者
新书发布:《Android系统多媒体进阶实战》🚀
优质专栏: Audio工程师进阶系列【原创干货持续更新中……】🚀
优质专栏: 多媒体系统工程师系列【原创干货持续更新中……】🚀
优质视频课程:AAOS车载系统+AOSP14系统攻城狮入门视频实战课 🚀
人生格言: 人生从来没有捷径,只有行动才是治疗恐惧和懒惰的唯一良药.
🌻1.前言
本篇目的:Android studio报错解决:Unable to load class: org.gradle.api.plugins.MavenPlugin
🌻2.详细报错
在Androd studio安装时报错:
Unable to load class ‘org.gradle.api.plugins.MavenPlugin’
org.gradle.api.plugins.MavenPlugin
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.
🌻3.解决方案
- 1.安装gradle命令
# sudo snap install gradle --classic
- 2.进入Android Studio项目
# cd test_demo
- 3.查看gradle版本
# gradle -v
------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------
Build time: 2021-08-17 09:59:03 UTC
Revision: a773786b58bb28710e3dc96c4d1a7063628952ad
Kotlin: 1.5.21
Groovy: 3.0.8
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 16.0.1 (Private Build 16.0.1+9-Ubuntu-120.04)
OS: Linux 6.8.0-47-generic amd64
- 4.解决步骤
# gradle wrapper --gradle-version 7.2