AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
518 stars 117 forks source link

Proguard rules #44

Closed ghost closed 3 years ago

ghost commented 3 years ago

Video compression is working perfectly but I'm not able create release build because of proguard. @AbedElazizShe Can you please provide proguard rules for the compressor.

AbedElazizShe commented 3 years ago

Thank you for opening this issue. Which rule do you think is causing the issue, could you please share the error you're getting so I can prepare the rules needed, I don't know from where to start to be honest.

AbedElazizShe commented 3 years ago

Will close this issue due to inactivity, please reopen if you stil need help. Thank you

melkopisi commented 3 years ago

i have also this issue when i try to create a release build here's my log

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/aspectj/runtime/reflect/Factory; at com.coremedia.iso.boxes.FileTypeBox.ajc$preClinit(SourceFile:1) at com.coremedia.iso.boxes.FileTypeBox.<clinit>(SourceFile:1) at com.abedelazizshe.lightcompressorlibrary.MP4Builder.createFileTypeBox(SourceFile:165) at com.abedelazizshe.lightcompressorlibrary.MP4Builder.createMovie(SourceFile:68) at com.abedelazizshe.lightcompressorlibrary.Compressor.compressVideo(SourceFile:139) at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(SourceFile:97) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:33) at kotlinx.coroutines.q0.run(SourceFile:106) at kotlinx.coroutines.r2.a.p(SourceFile:571) at kotlinx.coroutines.r2.a$b.c(SourceFile:738) at kotlinx.coroutines.r2.a$b.m(SourceFile:678) at kotlinx.coroutines.r2.a$b.run(SourceFile:665) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.aspectj.runtime.reflect.Factory" on path: DexPathList[[zip file "/data/app/com.test.myApp-YNBFyblaZMaQiAeyzfwhAg==/base.apk"],nativeLibraryDirectories=[/data/app/com.test.myApp-YNBFyblaZMaQiAeyzfwhAg==/lib/arm64, /data/app/com.test.myApp-YNBFyblaZMaQiAeyzfwhAg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.coremedia.iso.boxes.FileTypeBox.ajc$preClinit(SourceFile:1) at com.coremedia.iso.boxes.FileTypeBox.<clinit>(SourceFile:1) at com.abedelazizshe.lightcompressorlibrary.MP4Builder.createFileTypeBox(SourceFile:165) at com.abedelazizshe.lightcompressorlibrary.MP4Builder.createMovie(SourceFile:68) at com.abedelazizshe.lightcompressorlibrary.Compressor.compressVideo(SourceFile:139) at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(SourceFile:97) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:33) at kotlinx.coroutines.q0.run(SourceFile:106) at kotlinx.coroutines.r2.a.p(SourceFile:571) at kotlinx.coroutines.r2.a$b.c(SourceFile:738) at kotlinx.coroutines.r2.a$b.m(SourceFile:678) at kotlinx.coroutines.r2.a$b.run(SourceFile:665)