During a build i get the error:
Warning:com.bumptech.glide.load.resource.bitmap.VideoDecoder: can't find referenced method 'android.graphics.Bitmap getScaledFrameAtTime(long,int,int,int)' in library class android.media.MediaMetadataRetriever
with the following proguard settings
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$* {
*[] $VALUES;
public *;
}
glide 4.5.0
buildTools 27.0.3
googleLibs 11.8.0
supportLib 27.0.2
Android 3 version 3.0.1
I reverted back to version 4.3.0 where the error does not happen.
Can you include the full error message? Does the warning prevent you from building? What version of Android are you compiling against?
See http://bumptech.github.io/glide/doc/download-setup.html#android-sdk-requirements.
If you're just seeing a warning, you can ignore it .The method in question was added in API 27.
I've stumbled on same issue here. Proguard is preventing here from successful build is there any proguard rule for that? or just ignore this one?
@felislynx-silae can you answer any of the questions in my first comment?
compileSdkVersion 27
buildToolsVersion '26.0.2'
minSdkVersion 21
targetSdkVersion 21
implementation 'com.github.bumptech.glide:glide:4.5.0'
Without : -dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder in proguard rules, build is failed, with this line, build is success.
Error message is like holoduke wrote. Before this line some standard lint infos and after that message gradle output that build has failed because of proguard forces to fix this warning
Does targeting API 27 fix the issue?
@sjudd Can't confirm that. Since GearVR had some strange requirement for manifest values like min/target = 21 :/ Other project which targets 27 works fine. But i don't think that should be a solution
Yeah I realize targeting API 27 may not be a practical solution, but it's helpful to know as a debugging step. This is the first year we're being relatively aggressive about targeting new APIs and next year it's likely we'll be even more aggressive. Since we've already made the changes this year, hopefully we can use what we learn now to make next year go a bit smoother.
Probably adding dontwarn is the right answer here, but other ideas are welcome.
Where do you add the don't warn then. in the proguard file? It is not causing any runtime exceptions?
@holoduke Yes, in proguard file. I've done full app checks with many scenarios before release. Right now, i don't see any crash reports :). So so far so good
I added this ,resolved.
-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder
Most helpful comment
I added this ,resolved.
-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder