Android报错:java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 free bytes and 61MB until OOM

Android报错:java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 free bytes and 61MB until OOM,第1张

概述错误代码:   java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 free bytes and 61MB until OOM 错误原因:   内存超了 解决方法:   1、处理图片和视频减少加载量   2、开启多个线程,避免所有处理都在主线程中处理   3、在AndroidM

错误代码:

  java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 free bytes and 61MB until OOM

错误原因:

  内存超了

解决方法:

  1、处理图片和视频减少加载量

  2、开启多个线程,避免所有处理都在主线程中处理

  3、在AndroIDManifest.xml文件中的application标签中添加如下四行代码就解决问题了

  androID:allowBackup="true"   androID:supportsRtl="true"   androID:largeHeap="true"   androID:harDWareAccelerated="false"
如下:
<application    androID:allowBackup="true"    androID:harDWareAccelerated="false"    androID:icon="@mipmap/ic_launcher"    androID:label="@string/app_name"    androID:largeHeap="true"    androID:supportsRtl="true"    androID:theme="@style/Apptheme">
总结

以上是内存溢出为你收集整理的Android报错:java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 free bytes and 61MB until OOM全部内容,希望文章能够帮你解决Android报错:java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 free bytes and 61MB until OOM所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1121575.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存