I upgraded my windows and reinstalled Android studio 0.3.2. I am using windows8.1 Pro now and installed java x64, I also did set up JAVA_HOME
EV to C:\Program Files\Java\jdk1.7.0_45
and Android studio is installed in D:\Android Stutio\
When I try to run my project I get the Following Error
Cannot run program "C:\Program Files (x86)\Java\jdk1.7.0_40\bin\java" (in directory "D:\Android Stutio\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
Android studio is installed in D:\Android Stutio\
How to fix this one
Since android studio is still referring to jdk1.7.0_40 change its path
Goto Files->Other Settings->Default Project Structure.
Under Platform Settings Select Android sdk...under JDK location change C:\Program Files (x86)\Java\jdk1.7.0_40 to C:\Program Files\Java\jdk1.7.0_45
That should do the trick :)
Try the following: Open a new commandline (Win+R => cmd.exe) and enter "java". I predict that you'll get an error that says something like "command not found". The reason for this is that you don't have an windows environment variable set for your java.exe.
Do so by Win+X => System => Advanced System Settings => Advanced => Environment variables => search for PATH under the system variables => edit => append the path to your java.exe sperarated by ;
For example: ../other/pathes/with/file.exe;C:\Program Files (x86)\Java\jdk1.6.0_45\bin
Save,close,restart
I got this same error on android studio 3.1 which I've just now updated. user3235168's answer worked for me.
Additionally I had to remove the check mark from 'Use embedded JDK(recommended)' Then browse to jdk's path - C:\Program Files\Java\jdk1.8.0_144
I hope this answer can be a reference for new comer!
I got same issue and I stuck for this error!
Finally I got solution here!
After I explore the error detail, I got message that there are issue with NDK. Try to disable NDK or add the following code in your gradle.build
packagingOptions{
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With