Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

android studio cannot find jdk in windows solution

 
Stephen Black
Ranch Hand
Posts: 52
1
Chrome MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found a problem with the Android Studio studio.bat file
and here it is

Do you see the problem in the last 2 lines of code?
It seems that if your environmental variable is %JAVA_HOME% the batch file will GOTO error
and an error message will be displayed and that's it NO ANDROID STUDIO FOR YOU,
even though %JAVA_HOME% contains a valid path, but if the environmental variable is something like
%ANDROID_STUDIO_JDK% like mine is because I created it myself then it will work

PROPOSED SOLUTIONS
(1) Edit the batch file
Where you see this

Change it to this

(2) Create an environmental variable named %ANDROID_STUDIO_JDK%
as shown here
https://kb.wisc.edu/cae/page.php?id=24500
 
Maneesh Godbole
Saloon Keeper
Posts: 11329
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done! It's not everyday, someone posts a solution even before anybody posts the problem!
For your effort, you just earned yourself a cow! Moo!

Did you know we have a Android FAQ which is a Wiki? In other words you can edit it yourself to add this useful information to that page!
 
Stephen Black
Ranch Hand
Posts: 52
1
Chrome MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason that nobody has asked yet is becuase this problem
only existed for such a short amount of time.
The latest Android Studio does not even have or require a .bat file
so this solution is outdated
I therefore think that it is best that this information NOT be in the wiki

Unfortunately I was unlucky enough to install Android studio just when the problem existed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic