I am getting this error:
Cannot run program "/usr/lib/jvm/java-1.7.0-openjdk-i386/bin/java" (in directory "/home/sergiy/.AndroidStudioPreview/system/compile-server"): error=2, No such file or directory
This happens after i remove all JDK (Open and other). Some time before I installed Oracle JDK from official site. So, new folder of JDK named jdk1.7.0.
JAVA_HOME=/usr/lib/jvm/jdk1.7.0 JDK_HOME=/usr/lib/jvm/jdk1.7.0 java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode)
Android studio starts without any errors. I think that a must rename path to JDK in Android studio? But how?
Method #1: For Android Studio Version 4.2 and Above Navigate to File > Project Structure > SDK Location. Upon navigating there you will find that a tab named “JDK Location”, select that and then you can set the JDK path for the current project on which you're working.
Open File Explorer (Win⊞ + R, type explorer, hit Enter), and browse for your Java installation folder. It will likely be installed in either Program Files\Java or Program Files (x86)\Java on your OS drive. Once you find your Java folder, Open to it.
To make sure that Windows can find the Java compiler and interpreter: Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.
Note that installing Android Studio doesn't automatically configure the built-in JDK command line tools. This matters if you want to use the Android SDK command line tools.
All done! I find it in File->Other Settings->Default Project Structure->SDKs. There I change JDK home path.
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