错误:无法初始化类com.android.sdklib.repositoryv2.AndroidSdkHandler [英] Error:Could not initialize class com.android.sdklib.repositoryv2.AndroidSdkHandler

查看:11462
本文介绍了错误:无法初始化类com.android.sdklib.repositoryv2.AndroidSdkHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在启动时使用Android Studio构建此项目,但发生错误。 Stacktrace的此处

解决方案

当系统中安装了多个JDK时,会出现此问题,我遇到了同样的问题,因为我错误地安装了oracle-jdk-9,而Android studio需要oracle-jdk-8



如果您使用的是Ubuntu,您可以从这个问题



因此,请按照以下所示进行以下更改:

ctrl + shift + alt + s 会打开项目结构,也可以从


文件 - >项目结构

然后更改JDK您可能已安装JDK 8的位置




I want to build this project with Android Studio at launching, but take a error. Stacktrace is here

解决方案

This problem occurs when there are multiple JDKs installed in your system, I had the same issue as I had mistakenly installed oracle-jdk-9 and Android studio requires oracle-jdk-8

If you are using Ubuntu you can install jdk-8 from this question.

So, Make following changes as shown below:

Press ctrl+shift+alt+s that will open project structure which can also be opened from

File -> Project Structure

And then change JDK Location where you may have installed JDK 8

这篇关于错误:无法初始化类com.android.sdklib.repositoryv2.AndroidSdkHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆