Android Studio installation on Windows 7 fails, no JDK found

后端 未结 29 2337
鱼传尺愫
鱼传尺愫 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

    My issue was caused because I have an & character in my Windows user name, so when installed in the default path I was getting the following error after running bin/studio.bat

                                                   |
                                                   v notice broken path
    The system cannot find the file C:\Users\Daniel \studio64.exe.vmoptions.
    Exception in thread "main" java.lang.NoClassDefFoundError: com/intellij/idea/Main
    Caused by: java.lang.ClassNotFoundException: com.intellij.idea.Main
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: com.intellij.idea.Main.  Program will exit.
    

    So I uninstalled and reinstalled it to program files and it launches fine now.

提交回复
热议问题