Error:Could not initialize class com.android.sdklib.repositoryv2.AndroidSdkHandler

前端 未结 9 3316
太阳男子
太阳男子 2020-12-10 10:35

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

9条回答
  •  不知归路
    2020-12-10 11:02

    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

    Here is the link to image

提交回复
热议问题