简体   繁体   中英

My App crashes if image size is larger than heap size

I am coding for audio, video, images streaming using JSON and doing image editing.

In image editing there are two options - either use camera or pick image from gallery. The camera works fine.

But when I pick image from gallery and when I choose image which is being snapped by camera and been stored in phone gallery, app crashes and if I choose default images app works fine.

But it works fine I use higher version android phone or costlier phone may they would have high heap size

So the question is how can I increase heap memory?

Presently testing on HTC Wildfire

You can not increase the heap on android devices, so you will need to hunt down memory leaks in your app to make sure you got as much heap free as possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM