วันพฤหัสบดีที่ 19 ธันวาคม พ.ศ. 2562

ไม่สามารถรัน Debug Application บน Android Emulator ได้ เนื่องจาก Could not reserve enough space for object heap

ปัญหานี้เกิดจากตัวจาวา แม้ว่าตัวภาษาที่ใช้จะไม่ใช่จาวาแล้วก็ตาม (.net, dart)
ให้ตั้งค่า environment variable ดังนี้

_JAVA_OPTIONS=-Xmx512M

  1. Right click on start-button and open "System"
  2. Search for "Advanced system settings" and open it
  3. Click the button "Environment Variables ..."
  4. In System Variables, click "New..."
  5. New Variable Name: _JAVA_OPTIONS
  6. New Variable Value: -Xmx512M
  7. Click OK
  8. Restart Visual Studio, so the variable is picked up