Sunday, July 25, 2021

3 Ways to Solve "No JVM installation found. Please install a 64-bit JDK" - Android Studio Example

You are an enthusiastic Java programmer who just learned about developing Android apps in Java. To start with you have installed Android Studio, which is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA, but as soon as you click on the Android Studio Desktop Icon to start Android Studio you are getting "No JVM installation found. Please install a 64-bit JDK" error? How do you solve this problem? Well, even though the error message is the same, every problem is different depending upon your machine, the Java version, whether your desktop or laptop has 32-bit or 64-bit OS e.g. Windows 8.1 or Windows 10. Whether you have installed 32-bit Java or 64-bit JDK e.g. JDK 1.8.0 and what is the value of the JAVA_HOME environment variable or whether you have defined it or not.


I'll go through a couple of examples to solve the "No JVM installation found. Please install a 64-bit JDK" error based upon some common scenarios. Most likely you would be able to solve your problem by following these steps, but if you are not then just paste the following details and we should be able to help you out

- Android Studio version you are installing
- Operation System e.g. Windows 8 or Windows 10 or Mac OS X
- whether OS is 32-bit or 64-bit
- Installed Java version e.g. JDK 1.8.0
- whether JVM is 32-bit or 64-bit
- How you are starting Android Studio, via batch file or via desktop icon

And, if you are new to the Android world and want to learn Android app development then you can also check out these Android online courses by Rob Percival and Nick Walter on Udemy. It's a great hands-on course to learn Android in depth.




Solution 1 - You are running Android Studio on 32-bit Machine

If you are running Android Studio on 32-bit machine e.g. Windows 7 then you need to make sure that Android Studio is also instructed to use that. You can do so by setting your JAVA_HOME to point to your 32-bit JDK and then changing the target exe file of Android Studio desktop shortcut. By default start icon of Android Studio refers to studio64.exe file, which requires 64-bit Java installation. Just change it to refer studio.exe, which can run on 32-bit JVM.

3 Ways to Solve "No JVM installation found. Please install a 64-bit JDK" - Android Studio


In short,
- Make sure JAVA_HOME points to 32-bit Java, if you don't know how to set JAVA_HOME, see here
- Make sure Android desktop icon point to studio.exe instead of the studio64.exe file.


Solution 2 - No JAVA_HOME variable

The Android Studio make use of JAVA_HOME environment variable to find the JVM installation. If you have not set the JAVA_HOME then you must do so by going into My Computer -> System Properties -> System Settings ->Environment Variables. Make sure your JAVA_HOME points to 64-bit JDK installation e.g. JDK 1.8.0. You can download 64-bit Java from Oracle's download website.

Remember, you can install both 32-bit and 64-bit JVM on a 64-bit operating system like Windows 10. So, please ensure you download the correct Java installer i.e. the 64-bit JDK installer.  If you are also first time starting development with Android, I suggest you reading Head First Android Development, the best book to start with Android.

How to solve "No JVM installation found. Please install a 64-bit JDK"


Solution 3 - Android Studio icon pointing to studio.bat file

If you have installed an Android Studio where Android studio icon is pointing to a studio.bat file instead of studio64.exe then you follow these steps to solve "No JVM installation found. Please install a 64-bit JDK" error

goto the AndroidStudio installation folder.
goto bin folder and open studio.bat in text editor
add set JAVA_HOME=C:\Program Files\Java2\jdk1.8.0//your java path after the ECHO line.
goto Start -> All Programmes -> Android Studio ->
right click on Android Studio and click on properties.
You will see the Target something like android-studio\bin\studio64.exe
change it to android-studio\bin\studio.bat


That's all about how to solve the "No JVM installation found. Please install a 64-bit JDK" error while starting Android Studio in Windows 10. As I said, your setup might be a little bit different, so if these solutions don't solve your problem and you are still getting "No JVM installation found. Please install a 64-bit JDK" error then please share the necessary details as requested in the first paragraph and I'll help you to troubleshoot and solve this problem. 

If you want to learn more about Android tools and developments, I suggest you read Android in Action 3rd edition. One of the better Android books for Java developers.

Other Java and Android troubleshooting tutorials you may like
  • An Introduction of How Android works for Java Programmers (read)
  • Top 21 Android Interview Questions for Java Programmers (read)
  • How to solve java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver in Java? [solution]
  • 2 Reasons of org.springframework.beans.factory.BeanCreationException: Error creating bean with name [Solution]
  • How to fix java.lang.ClassNotFoundException: org.postgresql.Driver error in Java? [solution]
  • SQLServerException: The index 58 is out of range - JDBC [solution]
  • Spring - java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener [solution]
  • How to fix java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver in Java? [solution]
  • java.sql.SQLException: No suitable driver found for 'jdbc:mysql://localhost:3306/mysql [Solution]
  • java.lang.ClassNotFoundException: com.mysql.jdbc.Driver [Solution]
  • java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet in Java Spring MVC Application  [solution]

No comments:

Post a Comment