简体   繁体   中英

Starting SDK Manager gives Java.NullPointerException on my mac

I have my Android SDK located in Documents, I have all my Dev files there only.
I installed Java Runtime. java -version returns

java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)

Starting android in android-sdk-macosx/tools gives me the NullPointer Exception.

Any idea why is this happening? I already installed all the android packages by executing tools/android update sdk --no-ui

This is just a guess, but it seems that you installed Java Runtime Environment (JRE), while Android SDK needs Java Development Kit (JDK). JDK contains JRE, but JRE is not enough for Android SDK. If you want to install JDK 1.8 from Oracle, here is the link: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html (there is a MacOS version in the page)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM