Why doesn't Android Studio accept new Java JDK location
Asked Answered
Y

1

2

I am trying to change the JDK location from "C:\Program Files\Java\jdk1.7.0_09" to "C:\Program Files\Java\jdk1.8.0_25", but Android Studio seems to ignore the change completely. The location remains "C:\Program Files\Java\jdk1.7.0_09".

Could anyone offer a tip on how to remedy this?

I have tried many times and restarted AS a few times. I must be missing something fundamental. enter image description here enter image description here enter image description here

Yeager answered 15/7, 2016 at 20:18 Comment(3)
check your firewall settings, I had to allow it through my firewall when I switchedDaytoday
@quidproquo Thank you for the comment. I have just tried it with the firewall disabled, but it did not make any difference. I have just realized that I cannot change anything of the project structure.Yeager
worst comes to worst reinstall android studio I supposeDaytoday
D
1

Try this, may be work.

Android studio don't accept a SDK path that contains a whitespace. In your SDK path, there is a white space between 'Program Files'. Therefore Android Studio showing the error. Solution- Try placing the SDK at 'C:\sdk'. Then change the SDK location in Project Structure.

Daddylonglegs answered 16/7, 2016 at 7:37 Comment(2)
Thank you. This has solved the problem. The path was like that for 1.5 years since I switched to AS from Eclipse. I saw the warning, but always ignored it because I do not use NDK for this project. Everything was working fine until I tried to change the JDK path yesterday.Yeager
This is correct. You can also try the following solution: https://mcmap.net/q/56326/-android-sdk-location-should-not-contain-whitespace-as-this-cause-problems-with-ndk-toolsSuffuse

© 2022 - 2024 — McMap. All rights reserved.