ClassNotFoundException: com.coremedia.iso.boxes.FileTypeBox 在 K4LVideoTrimmer

ClassNotFoundException: com.coremedia.iso.boxes.FileTypeBox in K4LVideoTrimmer

我正在尝试集成 Video -Trimming https://github.com/knowledge4life/k4l-video-trimmer 并遇到以下错误。我尝试按照各种 post 中的建议更改混淆器。但还不能成功。请提前help.Thanks

02-15 21:59:20.843 5421-5679/? E/AndroidRuntime: FATAL EXCEPTION: pool-8-thread-2
                                             Process: com.abc.main, PID: 5421
                                             java.lang.RuntimeException: java.lang.ClassNotFoundException: com.coremedia.iso.boxes.FileTypeBox
                                                 at com.b.a.g.a(Unknown Source)
                                                 at com.b.a.a.a(Unknown Source)
                                                 at com.d.a.d.r(Unknown Source)
                                                 at com.d.a.d.hasNext(Unknown Source)
                                                 at com.d.a.c.e.hasNext(Unknown Source)
                                                 at com.b.a.d.a(Unknown Source)
                                                 at com.d.a.a.b.a.a.a(Unknown Source)
                                                 at life.knowledge4.videotrimmer.b.b.a(Unknown Source)
                                                 at life.knowledge4.videotrimmer.b.b.a(Unknown Source)
                                                 at life.knowledge4.videotrimmer.K4LVideoTrimmer.a(Unknown Source)
                                                 at life.knowledge4.videotrimmer.b.a$a.run(Unknown Source)
                                                 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:154)
                                                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                 at java.lang.Thread.run(Thread.java:818)
                                              Caused by: java.lang.ClassNotFoundException: com.coremedia.iso.boxes.FileTypeBox
                                                 at java.lang.Class.classForName(Native Method)
                                                 at java.lang.Class.forName(Class.java:324)
                                                 at java.lang.Class.forName(Class.java:285)
                                                 at com.b.a.g.a(Unknown Source) 
                                                 at com.b.a.a.a(Unknown Source) 
                                                 at com.d.a.d.r(Unknown Source) 
                                                 at com.d.a.d.hasNext(Unknown Source) 
                                                 at com.d.a.c.e.hasNext(Unknown Source) 
                                                 at com.b.a.d.a(Unknown Source) 
                                                 at com.d.a.a.b.a.a.a(Unknown Source) 
                                                 at life.knowledge4.videotrimmer.b.b.a(Unknown Source) 
                                                 at life.knowledge4.videotrimmer.b.b.a(Unknown Source) 
                                                 at life.knowledge4.videotrimmer.K4LVideoTrimmer.a(Unknown Source) 
                                                 at life.knowledge4.videotrimmer.b.a$a.run(Unknown Source) 
                                                 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) 
                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:154) 
                                                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269) 
                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                                 at java.lang.Thread.run(Thread.java:818) 

这是一个known problem with Proguard

解决方法是编辑您的 proguard-pro.cfg 并添加:

-keep class * implements com.coremedia.iso.boxes.Box {* ; }
-dontwarn com.coremedia.iso.boxes.*
-dontwarn com.googlecode.mp4parser.authoring.tracks.mjpeg.**
-dontwarn com.googlecode.mp4parser.authoring.tracks.ttml.**

那么你签名的apk就不会崩溃了。