You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

启动Android Studio遇Failed to create JVM error: -6错误求助

Hey there! Let's work through that "Failed to create JVM error: -6" issue you're hitting with Android Studio on your ThinkPad T430. I’ve helped plenty of users with similar low-RAM setups fix this exact problem, so here are some practical, tested solutions to try:

Fixes for "Failed to create JVM error: -6" in Android Studio

First, a quick recap of your setup to ground this: you’re on a ThinkPad T430 (i5, 4GB RAM, Windows 10 64-bit, 64-bit Java), got the latest Android Studio working after fixing performance lag, but now this JVM error pops up on restart—even after resetting JAVA_HOME. Let’s dive in:

1. Tweak Android Studio’s VM Memory Allocation

This error almost always ties to incorrect heap size settings in Studio’s config files, especially on 4GB RAM systems.

  • Head to your Android Studio installation folder, then open the bin directory.
  • Find and edit studio64.exe.vmoptions (since you’re on 64-bit Windows) with a text editor like Notepad++.
  • Look for the lines starting with -Xms (initial heap size) and -Xmx (max heap size). For your 4GB RAM, set these to values that don’t starve Windows of memory:
    -Xms512m
    -Xmx1024m
    
    Pro tip: Don’t set -Xmx higher than 1536m here—Windows needs at least 2GB to run smoothly alongside Studio.
  • Save the file, then restart Android Studio.

2. Double-Check JAVA_HOME Points to a 64-Bit JDK

Even if you reset it, it’s easy to accidentally point to a JRE or 32-bit JDK:

  • Open Command Prompt and run echo %JAVA_HOME%—it should lead to a 64-bit JDK folder (not JRE), like C:\Program Files\Java\jdk1.8.0_351 (use your installed version).
  • Run java -version next—look for "64-Bit" in the output to confirm it’s the right architecture.
  • If it’s incorrect, update JAVA_HOME in System Properties > Advanced > Environment Variables, then restart your PC before launching Studio again.

3. Turn Off Compatibility Mode for Studio

Compatibility settings can interfere with how the JVM launches:

  • Right-click studio64.exe in the bin folder > Properties > Compatibility tab.
  • Uncheck both "Run this program in compatibility mode for" and "Run this program as an administrator".
  • Click Apply > OK, then try starting Studio again.

4. Clear Android Studio’s Corrupted Cache

Sometimes cached files get messed up and cause startup failures:

  • Go to C:\Users\[YourUsername]\.AndroidStudio[YourVersion]\system (replace with your actual username and Studio version).
  • Delete the caches and tmp folders.
  • Launch Android Studio—it’ll rebuild the cache (this might take a minute), but it often fixes weird startup errors.

5. Uninstall Conflicting Java Versions

If you have both 32-bit and 64-bit Java installed, they can clash:

  • Open Control Panel > Programs and Features.
  • Uninstall any 32-bit Java versions or unused JDKs/JREs.
  • Keep only the 64-bit JDK you’re using for Android Studio.

If none of these do the trick, try a clean reinstall of Android Studio (make sure to back up your projects first!). That usually resolves any lingering config issues.

内容的提问来源于stack exchange,提问作者A.McLoof

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:58:15