Android Studio Error: Error:CreateProcess error=21

2019-01-02 23:09发布

Installed Android Studio 2.2 Preview 2 and getting this error:

Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher

Screenshot: enter image description here

I re-installed the JDK, still same issue.

I even tried to use the embedded JDK but still having the same issue:

enter image description here

4条回答
Emotional °昔
2楼-- · 2019-01-02 23:36

REASON

This happens because for now they only ship 64bit JRE with Android Studio for Windows which produces glitches in 32 bit systems.

SOLUTION

  • do not use the embedded JDK: Go to File -> Project Structure dialog, uncheck "Use embedded JDK" and select the 32-bit JRE you've installed separately in your system
  • decrease the memory footprint for Gradle in gradle.properties(Project Properties), for eg set it to -Xmx768m.

For more details: https://code.google.com/p/android/issues/detail?id=219524

查看更多
霸刀☆藐视天下
3楼-- · 2019-01-02 23:36

i think android studio has a 64bit kernel version which is giving the problem. https://github.com/swcarpentry/windows-installer/issues/49

查看更多
贪生不怕死
4楼-- · 2019-01-03 00:03

I had the same issue, but I have resolved it the next:

1) Install jdk1.8...

2) In AndroidStudio File->Project Structure->SDK Location, select your directory where the JDK is located, by default Studio uses embedded JDK but for some reason it produces error=216.

3) Click Ok.

查看更多
Bombasti
5楼-- · 2019-01-03 00:03

Don't worry... Its much easy to solve your problem. Just SET you SDK-LOCATION and JDK-LOCATION.

  • Click on Configure ( As Soon Android studio open )
  • Click Project Default
  • Click Project Structure
  • Clik Android Sdk Location

  • Select & Browse your Android SDK Location (Like: C:\Android\sdk)

  • Uncheck USE EMBEDDED JDK LOCATION

  • Set & Browse JDK Location, Like C:\Program Files\Java\jdk1.8.0_121
查看更多
登录 后发表回答