a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
362 stars 115 forks source link

minify enabled app crashes #99

Closed atiyakamal19 closed 10 months ago

atiyakamal19 commented 10 months ago

Hi,

I was getting error on android 13 "storage permission denied" To fix the above issue, I have upgraded to 'com.github.a914-gowtham:android-video-trimmer:1.7.14' As it was documented in the issues. For the above update to work I have upgraded gradle version and kotlin version 'com.android.tools.build:gradle:7.3.1' ext.kotlin_version = '1.8.0'

After doing this I am getting this error Please help me with this issue. I have tried other solutions provided.But it didnt work for me.

E/mobile-ffmpeg: OnLoad thread failed to GetStaticMethodID for log. A/valaya.defted: java_vm_ext.cc:594] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static method "Lcom/arthenica/mobileffmpeg/Config;.log(JI[B)V" java_vm_ext.cc:594] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2) java_vm_ext.cc:594] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1121) java_vm_ext.cc:594] at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1075) java_vm_ext.cc:594] at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:998) java_vm_ext.cc:594] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1661) java_vm_ext.cc:594] at void com.arthenica.mobileffmpeg.Config.() (SourceFile:133) java_vm_ext.cc:594] at int com.arthenica.mobileffmpeg.Config.ffmpegExecute(long, java.lang.String[]) (SourceFile:623) java_vm_ext.cc:594] at int com.arthenica.mobileffmpeg.FFmpeg.execute(java.lang.String[]) (SourceFile:68) java_vm_ext.cc:594] at void com.gowtham.library.ui.ActVideoTrimmer.lambda$execFFmpegBinary$9(java.lang.String[], boolean) (SourceFile:607) java_vm_ext.cc:594] at void com.gowtham.library.ui.ActVideoTrimmer.$r8$lambda$4WzYOItr90a8C4LEKMKUX6DCkWI(com.gowtham.library.ui.ActVideoTrimmer, java.lang.String[], boolean) (SourceFile:-1) java_vm_ext.cc:594] at void com.gowtham.library.ui.ActVideoTrimmer$$ExternalSyntheticLambda8.run() (SourceFile:-1) java_vm_ext.cc:594] at void java.lang.Thread.run() (Thread.java:1012) java_vm_ext.cc:594] java_vm_ext.cc:594] in call to NewGlobalRef java_vm_ext.cc:594] from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) W/Parcel: Expecting binder but got null!

a914-gowtham commented 10 months ago

@atiyakamal19 hey i can reproduce the issue. looks like issue related to ffmpeg native code. i will update sdk to new ffmpeg-kit and check the build if i still face the issue i will create issue in ffmpeg-kit repo. will check the proguard rules as well

a914-gowtham commented 10 months ago

@atiyakamal19 with ffmpeg-kit the issue is fixed. i will create a new release with the fix by today.

atiyakamal19 commented 10 months ago

Thank you.

a914-gowtham commented 10 months ago

@atiyakamal19 Fixed in the 1.7.17 version. but, apk size is increased due to ffmpeg-kit.

atiyakamal19 commented 10 months ago

Thank you for solving the issue :) It is asking to set minimum SDK version to 24 Can we allow for SDK version 23

a914-gowtham commented 10 months ago

ffmpeg-kit's minSDK version is 24. so, this library have to stick with it. minsdkversion 24 is preferred while creating a new project in android studio. so, u may consider it. or else v1.7.16 uses ffmpeg-kit-LTS version thats minsdkversion is 19.