简体   繁体   中英

Windows 10 Android Studio installation jdk error

Alright I'm running windows 10 and I'm trying to install Android Studio 2.1 but it gave me a can't find valid jdk error so I downloaded jdk 1.8.0 and rebooted the installer but the problem still persists so I spent a few hours trying to figure out how to fix this. I made environment variables JAVA_HOME and set its path to C:\\Program Files\\Java\\jdk1.8.0_101 for both user ans system variables then rebooted the installer again and it still can't find a valid jdk.

How can I fix this? Here's a picture of the error

At the risk of being down-voted, I'll point out that there's a reason why some large percentage of developers working non-MS-specific languages use MacBooks or "PC" laptops running Linux.

That reason is that things tend to "just work". There's much less silliness about trying to "protect" the user from themselves by pretending that parts of the filesystem are in places other than where they actually are.

I'd suggest either installing VirtualBox or Docker (recently available for Windows), with your favorite Linux distro, and then setting up your dev environment in that.

It may take a bit of fiddling to get the USB communication to your Android device working with the virtualization, but it would totally be worth it.

I'm not sure if it would help, but here's my case :

  • CLASSPATH=C:\\Program Files\\Java\\jre1.8.0_102\\lib
  • JAVA_HOME=C:\\Program Files\\Java\\jre1.8.0_102
  • Microsoft Windows [版本 10.0.10586] (Windows 10 Pro x64)

And I'm installing Android studio 2.1, it looks fine.

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