wseemann / FFmpegMediaMetadataRetriever

FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
1.73k stars 387 forks source link

no static or non-static method _setDataSource #168

Closed Yuuuuun closed 2 years ago

Yuuuuun commented 6 years ago

ERROR: FFmpegMediaMetadataRetriever native registration failed art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static or non-static method "Lwseemann/media/FFmpegMediaMetadataRetriever;._setDataSource(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V"

why occured this error when I added all .so file to project's "libs' in android studio?

dahis39 commented 6 years ago

I'm having this crash too. It's caused by ProGuard in my case. When I disable ProGuard in my release build it runs fine. I tried putting -keep class wseemann.media.FFmpegMediaMetadataRetriever.* { ; } into ProGuard config, but this error remains.

dahis39 commented 6 years ago

I solved it by excluding both the class in your app that use FFmpegMediaMetadataRetriever and the whole FFmpegMediaMetadataRetriever library in your ProGuard config.

My scripts: -keep class com.xxx.app.package.class { ; } -keep class wseemann.media.FFmpegMediaMetadataRetriever { ; }

Yuuuuun commented 6 years ago

@dahis39 Thanks very much! it works!

wseemann commented 2 years ago

Thanks for the help @dahis39!