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

前端 未结 9 3300
太阳男子
太阳男子 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:08

    If anyone is having issues with IntelliJ IDEA, go to File -> Project Structure (or press Ctrl + Alt + Shift + S) and remove all JDK 9 entries. JDKs are marked under Platform Settings -> SDKs with a folder behind a tiny blue cup of coffee.

    I tried adding the correct path to JDK 1.8 but IntelliJ IDEA will default back to JDK 9 for whatever reason. Unfortunately, I need JDK 9 for other projects, so uninstalling it would be too much of a hassle. If you need to use JDK 9 for another project (like I do), you can still add a JDK 9 entry via the same menu and then remove it again when required.

提交回复
热议问题