Android apps are getting laggy and frozing. (Gapps mostly)

Recently all of a sudden this problem began to occur. Especially facing this issue on gmail and youtube and rarely other apps. Whenever i am opening an email with attachments and try to scroll it freezes and restarts. Same issue happens with Youtube when scrolling through comments. Tried clearing the cache etc. but nothing helped.

This is one of the last one and it's log. Sometimes it's something like "java out of memory" or something like " anr input dispatching timed out". My phone is completely useless like this and i am desperate, any help would be appreciated. Xiaomi Mi Max 2 64GB, stock firmware, everything is up to date.
java.lang.OutOfMemoryError: Failed to allocate a 44 byte allocation with 3976 free bytes and 3KB until OOM
at java.util.HashMap.resize(HashMap.java:511)
at java.util.HashMap.addEntry(HashMap.java:808)
at java.util.LinkedHashMap.addEntry(LinkedHashMap.jav a:464)
at java.util.HashMap.put(HashMap.java:436)
at org.json.JSONObject.put(JSONObject.java:264)
at com.android.mail.providers.Attachment.a(SourceFile :17)
at com.android.mail.providers.Attachment.a(SourceFile :5)
at com.android.mail.browse.MessageFooterView.b(Source File:15)
at com.android.mail.browse.MessageFooterView.onLoadFi nished(SourceFile:8)
at android.app.LoaderManagerImpl$LoaderInfo.callOnLoa dFinished(LoaderManager.java:489)
at android.app.LoaderManagerImpl$LoaderInfo.onLoadCom plete(LoaderManager.java:457)
at android.content.Loader.deliverResult(Loader.java:1 44)
at android.content.CursorLoader.deliverResult(CursorL oader.java:109)
at android.content.CursorLoader.deliverResult(CursorL oader.java:97)
at android.content.AsyncTaskLoader.dispatchOnLoadComp lete(AsyncTaskLoader.java:265)
at android.content.AsyncTaskLoader$LoadTask.onPostExe cute(AsyncTaskLoader.java:92)
at android.os.AsyncTask.finish(AsyncTask.java:667)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:684)
at android.os.Handler.dispatchMessage(Handler.java:10 2)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.jav a:6372)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:791)

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by gusikowski.waino
4 hours ago
Last post by nona.kirlin
1 hour ago
Last post by nyasia.konopelski
2 hours ago
Last post by tania57
1 hour ago
Last post by estelle16
4 hours ago
Last post by reinhold17
2 hours ago
Last post by qfadel
19 minutes ago