【问题标题】:android studio application cannot be run in windows 7 machineandroid studio 应用程序无法在 windows 7 机器上运行
【发布时间】:2017-01-18 11:53:09
【问题描述】:

在我的 Android 工作室中,运行应用程序时出现以下错误。

Error:Error: Could not create the Java Virtual Machine.
Error:Error: A fatal exception has occurred. Program will exit.
Error:Error: Could not create the Java Virtual Machine.
Error:Error: A fatal exception has occurred. Program will exit.
Error:Invalid maximum heap size: -Xmx4g
Error:The specified size exceeds the maximum representable size.
Error:Invalid maximum heap size: -Xmx4g
Error:The specified size exceeds the maximum representable size.
:dmart-android:transformClassesWithDexForDev FAILED
Error:Execution failed for task ':dmart-android:transformClassesWithDexForDev'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1

我有 32 位 windows 7 机器,无法运行。 请告诉我如何清除错误。

【问题讨论】:

标签: android android-studio android-gradle-plugin android-studio-2.1


【解决方案1】:

好的,首先您必须将您的 AVD(Android 虚拟设备)重新配置为更小的堆大小,这可以通过工具>Android>AVD 管理器打开 AVD 管理器来完成

您应该会在打开的窗口中看到您的虚拟设备。选择窗口右侧的绿色铅笔图标来编辑设备配置。

设备的堆、存储和 RAM 设置可在高级设置点击下找到。您可以修改它们以适合您的计算机。

请注意,您 ADV 的性能取决于您使用的计算机的硬件(这意味着当您的计算机没有超过 4 Gb RAM 时,您无法在 4Gb RAM 上运行 AVD)

【讨论】:

    【解决方案2】:

    我安装了 32 位的 Windows 7 并使用了 8 个 Ram,所以系统只使用了 4GB 我安装了 64 位操作系统。现在它的工作。

    【讨论】:

      猜你喜欢
      • 2020-02-11
      • 1970-01-01
      • 2013-05-11
      • 1970-01-01
      • 2014-04-20
      • 1970-01-01
      • 1970-01-01
      • 2012-07-10
      • 1970-01-01
      相关资源
      最近更新 更多