skip to Main Content

In SDK we use iso parser library for video compression and few other things. It works fine in a test project, but when I try to use the snapshot version in another project iso parser does not work as it should. That is, while video compression it drops the audio. I don’t know why, but when I configure it like this all works fine:

implementation('com.name.lib:Library:1.2.19-SNAPSHOT') {
    exclude group: 'com.googlecode.mp4parser', module: 'isoparser'
}

implementation('com.googlecode.mp4parser:isoparser:1.0.6') {
    force = true
}

I know it’s not good practice to use this type of snippet for lib dependenies. Is there any solution to this? If you need more details, please let me know.

Someone below told me to add this in proguard so.

-keep class com.googlecode.mp4parser.isoparser.** { *; }

2

Answers


  1. Chosen as BEST ANSWER

    I solved this issue with not using isoparser library in our SDK.

    For most cases it can solve using keep method in proguard but in my case it didn't help me so i just removed isoparser from my SDK because of that now i don't have any Duplication error in other projects and now it not throw error like noclassfound

    While using dependecny in SDK it headache for SDK user because of this two errors

    • Duplication dependency found duplicate method while compiling that's conflict sdk
    • no class found in some case project it's fails to find some class of dependency that used in my SDK because Android studio not decomile whole SDK

    Conclusion : Try to not use any famous third party library in SDK


  2. Maybe you should keep All your classes related to the com.googlecode.mp4parser:isoparser:1.0.6 library in your proGuard.

    I think it’s a proGaurd issue and you probably must write a proGaurd or Consumer rule.

    add this to your library progaurd rule and your app progaurd rule and check again:

    -keep class com.coremedia.iso.** {*;}
    -keep class com.googlecode.mp4parser.** {*;}
    -keep class com.mp4parser.** {*;}
    
    -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.**
    
    -dontwarn com.coremedia.**
    -dontwarn com.googlecode.mp4parser.**
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search