zhihu / Matisse

:fireworks: A well-designed local image and video selector for Android
Apache License 2.0
12.52k stars 2.06k forks source link

Not recieving results in Android version 5 #790

Open vayalasp opened 4 years ago

vayalasp commented 4 years ago

First of all thanks for this Amazing library. I have been trying it for Android 10 and other and it worked fine, but yesteeday I tested in Android 5 Api 21 and no results were recieved from camera neither gallery. Am I missing something with this Android Version?

iewTarget: Glide treats LayoutParams.WRAP_CONTENT as a request for an image the size of this device's screen dimensions. If you want to load the original image and are ok with the corresponding memory cost and OOMs (depending on the input size), use override(Target.SIZE_ORIGINAL). Otherwise, use LayoutParams.MATCH_PARENT, set layout_width and layout_height to fixed dimension, or use .override() with fixed dimensions. Glide treats LayoutParams.WRAP_CONTENT as a request for an image the size of this device's screen dimensions. If you want to load the original image and are ok with the corresponding memory cost and OOMs (depending on the input size), use override(Target.SIZE_ORIGINAL). Otherwise, use LayoutParams.MATCH_PARENT, set layout_width and layout_height to fixed dimension, or use .override() with fixed dimensions.

/Glide: Load failed for content://media/external/images/media/17 with size [2560x2560] class com.bumptech.glide.load.engine.GlideException: Failed to load resource There were 3 causes: java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) call GlideException#logRootCauses(String) for more detail Cause (1 of 4): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{AutoCloseInputStream->Object->Drawable}, LOCAL There were 2 causes: java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) call GlideException#logRootCauses(String) for more detail Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AutoCloseInputStream->GifDrawable->Drawable} Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AutoCloseInputStream->Bitmap->Drawable} There was 1 cause: java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.lang.OutOfMemoryError: Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AutoCloseInputStream->BitmapDrawable->Drawable} There was 1 cause: java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.lang.OutOfMemoryError: Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM Cause (2 of 4): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptorInner->Object->Drawable}, LOCAL There was 1 cause: java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) call GlideException#logRootCauses(String) for more detail Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptorInner->Bitmap->Drawable} There was 1 cause: java.lang.OutOfMemoryError(Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.lang.OutOfMemoryError: Failed to allocate a 34949132 byte allocation with 16777216 free bytes and 20MB until OOM Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptorInner->BitmapDrawable->Drawable} Cause (3 of 4): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{AssetFileDescriptor->Object->Drawable}, LOCAL Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AssetFileDescriptor->Bitmap->Drawable} Cause (4 of 4): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{HierarchicalUri->Object->Drawable}, LOCAL Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{HierarchicalUri->Drawable->Drawable} Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{HierarchicalUri->Bitmap->Drawable}