Android Studio installation on Windows 7 fails, no JDK found

后端 未结 29 2118
鱼传尺愫
鱼传尺愫 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条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 05:26

    OK, I figured out how fix this nasty bug.

    Before you start

    Go to your Android Studio installation folder and locate the bin folder. Inside the bin folder, you will find studio.bat. Execute the file, and it'll show the error. If it is about the Java path then follow the tip 1.

    Tip 1

    When you set the path JAVA_HOME, etc., make sure not to include bin at the end of the path. This solved the issue for me.

    JAVA_HOME => C:\Program Files\Java\jdk1.7.0_21

    path => C:\Program Files\Java\jdk1.7.0_21\bin

    It works fine with JDK 1.7 (I tried with 32 bit).

    If you do so, you can see the initial screen as below.

    Enter image description here

    Tip 2

    Are you getting the below error message?

    Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.

    This error probably occurs, because you have reference to your older SDK (that you downloaded with Eclipse) in your path variable. Go to Environment variables and remove any reference to the old SDK folder and point it to new SDK folder that is found inside the Android Studio installation folder.

    Save and restart Studio, things should work as expected now.

    Tip 3

    If you hate messing around with the path variable as given above by removing old references, simply follow the following steps to refer to new SDK path that comes with Studio.

    *Project Defaults* -> *Project Structure* -> Click "New" -> Select "Android SDK" -> Select the SDK folder inside the studio installation.

提交回复
热议问题