java.lang.OutOfMemoryError error in my app - AISMCO

Name Of The App:
AISMCO
Download Link:


There are some crash reports in this app
The reports says 13 Crashes saying the following

[java.lang.OutOfMemoryError
in gnu.expr.PrimProcedure.apply]

Is there any way to solve the problem

A simple Google search resulted in :

I have already tried that
And did everything mentioned there yet it is not working on some phones

Well with that information currently I can suggest you to use this extension to perform procedure asynchronously,


and try to clean your logics(think of better logics)
And refer this guide too:

2 Likes

If your app is performing too much processes at one time then it will crash on low ram phones.
So try to decrease blocks as much as you can.

My App is such that it needs high processing. I have reduced the no of block but it doesn’t resolve the problem.
To lower the process I also used Clock Component to load after few seconds but that doesn’t solve the problem as well
I check if app crashes change High Quality images to false but that to didn’t worked
I am asking if you have any other solution to my problem

Did you try the extension linked above??
And also if you have multiple screens the search community for “How to switch screen” and follow the guide by Mika

I will surely try the extension
For switching screens I have already used Mika’s Method
Thanks
Ravi

Tried the extension
But this didn’t work as well

Can you post crash reports from your play console

if your app really need high ram usage and proccesing power then you can’t do much. you just need to tell your user the minimum system requirement to run the app.

I have taken a look at your app and it seem fairly simple. Try to Improve your Blocks. Also Do not Use Clock to execute Functions, it will reduce the apps performance. Also I tried your app on my OnePlus and it seems to work fairly well

click here …


make screenshot and post (something like that):

1 Like

Here you go,

It concerns a Galaxy J2 and Moto G4. Both have - as far as I know - only 1 GB of RAM. So probably the size / resolution of the images is the problem.

So either exclude devices with <= 1 GB of RAM from the Play Store or you can try to declare in the Manifest: android:largeHeap="true"

cause of the error, is like what they mention above… Its RAM. Espicially when you try to load big size of assets like image

how to declare it? any procedure or guide materials?

You have to decompile the APK and customize the Manifest.

Out of memory error generally occur if either you are not managing the images properly or not switching the screens properly
Follow my reply below for more information. Do follow the post linked to the reply and see if it helps

:+1: :slight_smile: