Android Studio installation on Windows 7 fails, no JDK found

后端 未结 29 2281
鱼传尺愫
鱼传尺愫 2020-11-22 04:48

I downloaded Android Studio and attempted to launch the program.

This is running on Windows 7 64-bit with Java 1.7. During the installation my Java 1.7 is detected,

29条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 05:26

    I couldn't get this to work no matter which environment variables I set. So I simply put a copy of the JDK into my Android Studio installation folder.

    1. Copy the contents of the JDK installation (for example, C:\Program Files (x86)\Java\jdk1.7.0_21)

    2. Paste them into the installation directory of the Android Studio (for example, C:\Program Files (x86)\Android\android-studio)

    I somewhat assumed that the issue was caused by having the x64 version of the JDK installed. But what was especially confusing was the fact that I could start Android Studio just fine when I started the studio.bat as an Administrator (even though the environment variables were set for my personal user account).

    studio.bat will look for several valid options when determining which JDK to use.

    :: Locate a JDK installation directory which will be used to run the IDE. :: Try (in order): ANDROID_STUDIO_JDK, ..\jre, JDK_HOME, JAVA_HOME.

    As explained above, I picked the ..\jre option.

提交回复
热议问题