Android studio报错解决:Unable to load class: org.gradle.api.plugins.MavenPlugin(二十九)

简介: CSDN博客专家、《Android系统多媒体进阶实战》一书作者

新书发布:《Android系统多媒体进阶实战》🚀
优质专栏: Audio工程师进阶系列原创干货持续更新中……】🚀
优质专栏: 多媒体系统工程师系列原创干货持续更新中……】🚀
优质视频课程:AAOS车载系统+AOSP14系统攻城狮入门视频实战课 🚀

人生格言: 人生从来没有捷径,只有行动才是治疗恐惧和懒惰的唯一良药.

更多原创,欢迎关注:Android系统攻城狮

欢迎关注Android系统攻城狮

🍉🍉🍉文章目录🍉🍉🍉

🌻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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Android系统攻城狮

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值