Reputation: 1405
I tried to run android-studio and i get this error:(in the studio it self)
Cannot run program "C:\Program Files\Java\jdk1.7.0_21\bin\java" (in directory "C:\Users\User.AndroidStudioPreview\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
the problem is why it's trying to use jdk1.7.0_21
and not jdk1.7.0_25
?(that what i got installed).
my Environment Variables are: (System variables)
Java_HOME: C:\Program Files\Java\jdk1.7.0_25.
ANDROID_SWT: C:\adt-bundle-windows-x86\sdk\tools\lib\x86.
Upvotes: 2
Views: 3058
Reputation: 1405
I fixed my problem by doing this:
Go into File > Project Structure (or use ALT+CTRL+SHIFT+S) and then under Platform Settings
Click on "SDKs" and then delete the "1.7" JDK and add new JDK using the correct JAVA PATH.
Upvotes: 10