I installed Android Studio but it was giving me error that I need to install JDK but JDK was already installed. Then I realized it is asking to install 64bit version of JDK.
Known issue - my solution was to install JDK 7u80 - worked after that.
https://code.google.com/p/android/issues/detail?id=187048
I had the same issue on windows 7 when I installed Android Studio. I had Jdk 8 on my system. So for me, copying the tools.jar from jdk\lib to androidstudio\lib worked. I found the tools.jar was missing from androidstudio's lib directory. I had set JAVA_HOME in user variable and JDK in system variable.
First locate in your PC the route of your JDK (for instance: C:\Program Files\Java\jdk1.7.0_45
)
then change the JAVA_HOME
variable as follows:
JAVA_HOME
I installed jdk 1.8.0_51 64bit on Windows7.
After that, no JAVA_HOME was defined, so I had to define it myself as described above, but it did not work unless I added a trailing backslash:
D:\Programs\Java\jdk1.8.0_51\
.
Without the backslash at the end it did not work.
Just Copy the tools.jar from your jdk to Android lib directory.
After I set JAVA_HOME variable and restart my windows pc I resolved my issue.
JAVA_HOME value should like below.
C:\Program Files\Java\jdk1.8.0_25\bin
I paste a screenshot for someone's help.
You can go here From My Computer / This PC > Property > Advance Variable.