SimformSolutionsPvtLtd / SSffmpegVideoOperation

This is a library of FFmpeg for android... 📸 🎞 🚑
Apache License 2.0
354 stars 85 forks source link

Conflict with c++_shared #47

Open renetik opened 1 year ago

renetik commented 1 year ago

I believe library shall not add its own c++_shared lib. When we have build arguments:

android {
    compileSdkVersion project.properties.sdk_version
    defaultConfig {
        minSdkVersion project.properties.min_sdk_version
        targetSdkVersion project.properties.sdk_version
        externalNativeBuild {
            cmake {
                cppFlags "-std=c++14 -fexceptions"
                arguments "-DANDROID_ARM_NEON=TRUE",'-DANDROID_STL=c++_shared'
            }
        }
    }

Build fails with:

2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:

alibabayev0 commented 1 year ago

Please may you try with that:

android {
    ...
    packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
    }
    ...
}
renetik commented 1 year ago

Well I dont like this solution you propose as it will clutter build gradle. Isnt it better to just ommit and use that cmake solution ? Or you cannot for other reason ? For now I am good as it is I just commented it out, everything seems ok, depended code use libc++_shared from your lib obviously.