美文网首页
Mac安装Android studio最终准确的答疑: 报错 :

Mac安装Android studio最终准确的答疑: 报错 :

作者: 天山海梦 | 来源:发表于2020-06-10 11:17 被阅读0次

Mac 系统第一次安装Android studio 时有以下报错:

Unable to load class 'org.jetbrains.kotlin.annotation.plugin.ide.AnnotationBasedPluginModelBuilderService'.

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.

这是因为mac系统之前没有安装gradle ,Android studio 运行起来必要的配置;

所以,我们必须先安装gradle 。

注意:在安装这个gradle之前还必须要安装一个东西!!!

就是AdoptOpenJDK 。。。。

安装 AdoptOpenJDK

1.HomeBrew (推荐) 命令:

brew tap AdoptOpenJDK/openjdk

brew cask install adoptopenjdk8

或 2.官网下载安装

https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot

之后,再安装gradle。。。。

我们使用Homebrew 来安装gradle 

$ brew update && brew install gradle   或 $  brew install gradle 

之后开始下载。。。。

需要不少时间,耐心等待。。。。

最后下载成功之后 :

$  gradle -version

 检查一下  gradle 是否成功安装

一切结束,大功告成,祝贺你已经成功安装gradle;

如果这篇文章感觉对亲有帮助的话,请赞赏我,鼓励我为亲们更多答疑解惑。

相关文章

网友评论

      本文标题:Mac安装Android studio最终准确的答疑: 报错 :

      本文链接:https://www.haomeiwen.com/subject/auuutktx.html