-3
我採取與相機的圖像的儲存於SD卡,存儲必須從SD卡上傳圖像到ImageView的那樣:java.lang.OutOfMemoryError
myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
ImageView _image=(ImageView)view.findViewById(R.id.imageCarte);
_image.setImageBitmap(myBitmap);
,但我有此錯誤:
05-05 08:23:20.593: E/AndroidRuntime(1936): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget.
任何人都可以幫助我。謝謝
比例位圖之前的圖像大小,你嘗試將其設置爲ImageView的面前,因爲錯誤說: – BeRecursive
因爲我已經說過(昨天)類似的問題被張貼至少是在目前過大每天兩次。在發佈之前請先檢查相關問題。答案基本上指向這裏:http://developer.android.com/training/displaying-bitmaps/index.html –
[java.lang.OutOfMemoryError:位圖大小超過VM預算的可能的重複 - Android](http:/ /stackoverflow.com/questions/1949066/java-lang-outofmemoryerror-bitmap-size-exceeds-vm-budget-android) –