android - Heap Space Size? -
i have db file(300mb) in assets folder.when running code gives me below error
error:execution failed task ':app:packagedebug'. > java heap space ect's gradle.properties file. example, following line, in gradle.properties file, sets maximum java heap size 1,024 mb: <em>org.gradle.jvmargs=-xmx1024m</em> <a href="http://www.gradle.org/docs/current/userguide/build_environment.html">read gradle's configuration guide</a><br><a href="http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html">read java's heap size</a>
below gradle.properties
# project-wide gradle settings. # ide (e.g. android studio) users: # gradle settings configured through ide *will override* # settings specified in file. # more details on how configure build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # specifies jvm arguments used daemon process. # setting particularly useful tweaking memory settings. # when configured, gradle run in incubating parallel mode. # option should used decoupled projects. more details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true org.gradle.jvmargs=-xmx1024m -xx:maxpermsize=1024m -xx:+heapdumponoutofmemoryerror -dfile.encoding=utf-8
i tried lot of things changing _java_options in environment variable, changing values in studio.exe.vmoptions , gradle.properties giving me same error.
please
try increasing java heap size. here steps:
look memory indicator in bottom right corner of android studio
if don't see option, enable android studio preferences > appearance , behaviour > appearance > show memory indicator
increase java heap size: choose > edit custom vm options
update xmx value in studio.vmoptions file open when select above option. 8gb ram have added these values, might need adjust based on system configuration:
-xmx4096m -xx:maxpermsize=1024m
you can find file in ~/library/preferences/androidstudio
restart android studio , see if memory indicator displays updated values.
Comments
Post a Comment