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

enter image description here

if don't see option, enable android studio preferences > appearance , behaviour > appearance > show memory indicator

enter image description here

increase java heap size: choose > edit custom vm options

enter image description here

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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -