Android:BitmapFactory.decodeStream()内存不足,带有400KB文件和2MB可用堆
我的应用在源代码的以下行中遇到OOM错误: image = BitmapFactory.decodeStream(assetManager.open(imgFilename)); 在导致应用因OOM错误而被终止的分配之前: (...) 08-05 21:22:12.443: I/dalvikvm-heap(2319): Clamp target GC heap from 25.056MB to 24.000MB 08-05 21:22:12.443: D/dalvikvm(2319): GC_FOR_MALLOC freed <1K, 50% free 2709K/5379K, external 18296K/19336K, paused 58ms 08-05 21:22:14.513: D/dalvikvm(2319): GC_EXTERNAL_ALLOC freed <1K, 50% free 2709K/5379K, external 18296K/19336K, paused 101ms 08-05 21:22:14.903: I/dalvikvm-heap(2319): Clamp target GC heap …