我无法运行或执行我的代码。我已经跟着this。任务':app:packageInstantRunResourcesDebug'的执行失败。 (Android Studio无法执行)
它仍然无法工作。我的错误信息
Error:Execution failed for task ':app:packageInstantRunResourcesDebug'. Java heap space ties file. For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB: org.gradle.jvmargs=-Xmx1024m Read Gradle's configuration guide
Read about Java's heap size
我试图关闭即时运行,并有一个新的错误
Error:Execution failed for task ':app:packageDebug'. Java heap space ect's gradle.properties file. For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB: org.gradle.jvmargs=-Xmx1024m Read Gradle's configuration guide
Read about Java's heap size
编辑:我找到了原因。这是因为我添加了一个代码,可以解压500MB文件并将其传输到内部存储器中。这可能是因为它有很多文件。该zipfile有80,000多个文件。
什么是你的机器的RAM? – AndiGeeky
4GB内存。它正在工作,但我重新安装它,因为当我安装即时运行时执行时间太长。但重新安装后,这会产生一个错误。 – Temmie
试试这个 - > https://developer.android.com/studio/intro/studio-config.html – AndiGeeky