Android java.lang.OutOfMemoryError?

前端 未结 8 813
旧巷少年郎
旧巷少年郎 2020-12-08 16:24
04-25 08:19:10.111    2431-2603/com.example.francesco.guidedautorewithtabs E/art﹕ Throwing OutOfMemoryError \"Failed to allocate a 4194316 byte allocation with 19836         


        
8条回答
  •  佛祖请我去吃肉
    2020-12-08 16:56

    OutOfMemoryError is the most common problem occured in android while especially dealing with bitmaps. This error is thrown by the Java Virtual Machine (JVM) when an object cannot be allocated due to lack of memory space and also, the garbage collector cannot free some space.

    As mentioned by Aleksey, you can add below entities in your manifest file android:hardwareAccelerated="false" , android:largeHeap="true" it will work for some environment's.

    
    

提交回复
热议问题