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

Hong
  • 17,643
  • 21
  • 81
  • 142
  • check your firewall settings, I had to allow it through my firewall when I switched – Bill Jul 15 '16 at 21:12
  • @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. – Hong Jul 15 '16 at 21:16
  • worst comes to worst reinstall android studio I suppose – Bill Jul 15 '16 at 21:17

1 Answers1

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.

Akshay
  • 101
  • 1
  • 10
  • 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. – Hong Jul 16 '16 at 11:46
  • This is correct. You can also try the following solution: https://stackoverflow.com/a/39816315/5939775 – A. Yosupov Mar 29 '18 at 06:24