[android] java.lang.OutOfMemoryError: Failed to allocateエラー

java.lang.OutOfMemoryError: Failed to allocateエラー

(java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM)

のようなメモリエラーが発生した場合、manifestに以下のコードを追加
android:hardwareAccelerated=”false”
android:largeHeap=”true”

サンプルコード


コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です