Android Studio错误"Java堆空间" [英] Android Studio error "Java heap space"

查看:81
本文介绍了Android Studio错误"Java堆空间"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Android Studio中开发一个Android应用程序,今天突然按下运行"按钮时,它无法编译.错误是这样的:

I'm developing an Android app in Android Studio and today suddenly it doesn't compile when I press the "Run" button. The error is this:

错误:任务执行失败 ':app:packageInstantRunResourcesDebug'. Java堆空间

Error:Execution failed for task ':app:packageInstantRunResourcesDebug'. Java heap space

我尝试清理项目并重建它,但是没有用.

I've tried cleaning the project and rebuilding it but it didn't work.

推荐答案

我尝试了许多解决方案,但最终,这帮助我解决了这个问题:-

I have tried many solutions but finally, this helped me to solve this problem : -

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

在"gradle-wrapper.properties"中使用此行.希望它对其他人也有帮助.

use this line in your "gradle-wrapper.properties". hope it helps others too.

这篇关于Android Studio错误"Java堆空间"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆