Android报错:java.lang.OutOfMemoryError: Failed to allocate a 74126220 byte allocation with 4190480 fre

错误代码:java

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

错误缘由:bash

  内存超了app

解决方法:spa

  一、处理图片和视频减小加载量线程

  二、开启多个线程,避免全部处理都在主线程中处理code

  三、在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">
相关文章
相关标签/搜索