why my application use all memory and get OutOfMemoryError: Failed to allocate?

后端 未结 3 1958
难免孤独
难免孤独 2020-12-24 09:55

why this happeing all the time?i dont have even a bitmap to recycle and i dont know why my application throw memory error.

i select image from gallery here is the co

相关标签:
3条回答
  • 2020-12-24 10:13

    Had similar issue on Android 5. Move your images to /drawable-nodpi instead of /drawable

    0 讨论(0)
  • 2020-12-24 10:31

    Maybe adding this line in Manifest on application tags will help you;

    <application
            ...
            ...
            android:largeHeap="true" >  
    
         ......
         ......
    
    </application>
    
    0 讨论(0)
  • 2020-12-24 10:31

    If your are using Emulator for testing Try setting the Ram of virtual Device to 2gb or so. i had the same problem on Virtual Device but the program Run smooth on my physical android device

    0 讨论(0)
提交回复
热议问题