Reputation: 6867
I can't open the monitor (ddms) in android studio getting following error:
A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run Monitor. No Java virtual machine was found after searching the following locations: C:\Android-Studio\android-studio\sdk\tools\lib\monitor-x86\jre\bin\javaw.exe javaw.exe in your current PATH
Would appreciate any suggestion how to fix this. thanks
Upvotes: 4
Views: 19031
Reputation: 416
Here is what I did in a few steps:
NB: Make sure the PATH of the location of your jre or jdk is set in your Environment Variables before you do these steps
Hope it's fixed, if not, restart your Android Studio
Upvotes: 0
Reputation: 413
Monitor is an eclipse RCP, so you can edit ini file to set JRE(or JDK) path.
for example:
A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run Monitor. No Java virtual machine was found after searching the following locations: C:\Android-Studio\android-studio\sdk\tools\lib\monitor-x86\jre\bin\javaw.exe javaw.exe in your current PATH
In this case, your monitor is located in "C:\Android-Studio\android-studio\sdk\tools\lib\monitor-x86". navigate to that path and edit monitor.ini file.
Add follwing line: -vm [your JRE path]
Upvotes: 0
Reputation: 8142
I'm trying adding my JRE path to PATH on Environment variables but doesn't work. Even I try making symbolic link (directories) C:\Android-Studio\android-studio\sdk\tools\lib\monitor-x86\jre\bin\ with C:\Program Files\Java\jre7\bin but doesn't work.
I found a solution and I this is is because Android Studio is updated but SDK Tools don't.
In my case I manually update AS from 0.8.6 to 0.8.12 manually (because updater in 0.8.6 are buggy), but not update SDK Tools.
Finally I update SDK using this post: Can't upgrade Android SDK Tools Can't upgrade Android SDK Tools
Now I have Android Studio (0.8.12) and SDK Tools (23.0.5) ... DDMS open again. :D
Upvotes: 0
Reputation: 1828
You must have your jdk or jre installed and in your path. Considering you are running windows you must go to your environment variables and add the location of one of them to the path. That is assuming you already have one of them installed. If you dont you need to go the oracle website and get one of them.
If you already have it installed go to your systems settings, then go to the advanced settings tab and click Environment variables at the bottom, there you edit the PATH and add the location of your jre or jdk, that should solver your problem.
Upvotes: 5