When I try to view local URI my application crashes with
fixed java.lang.OutOfMemoryError when open local URI:
02-03 15:10:50.836: E/AndroidRuntime(32577): java.lang.OutOfMemoryError
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:613)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:589)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.graphics.drawable.Drawable.createFromStream(Drawable.java:791)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.widget.ImageView.resolveUri(ImageView.java:660)
02-03 15:10:50.836: E/AndroidRuntime(32577): at android.widget.ImageView.setImageURI(ImageView.java:399)
02-03 15:10:50.836: E/AndroidRuntime(32577): at com.sarriaroman.PhotoViewer.PhotoActivity.loadImage(PhotoActivity.java:164)
02-03 15:10:50.836: E/AndroidRuntime(32577): at com.sarriaroman.PhotoViewer.PhotoActivity.onCreate(PhotoActivity.java:93)
When I try to view local URI my application crashes with
I have fixed the problem locally the following:
src/android/PhotoActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/android/PhotoActivity.java b/src/android/PhotoActivity.java index 9a17c0c..dd6d8a8 100644 --- a/src/android/PhotoActivity.java +++ b/src/android/PhotoActivity.java @@ -135,7 +135,7 @@ public class PhotoActivity extends Activity { / private void loadImage() {