0

I am developing an app using PJSIP. I have .so libraries (compiled using ndk-r10e) that they were working well before upgrade to Android Studio 3.0. This upgrade no longer supports useDeprecatedNdk and console says to follow this tutorial: Migrate from ndkCompile

I made this tutorial done and build is OK but running an app returns error:

Error:Execution failed for task ':pjsua:transformNativeLibsWithMergeJniLibsForDebug'.
> More than one file was found with OS independent path 'lib/armeabi-v7a/libpjsua2.so'

I have already tried clean and Invalidate cache / restart.

Can anybody help?

matusalem
  • 2,461
  • 2
  • 26
  • 35

2 Answers2

2

I put this into gradle and it seems it's working now...

android {
    packagingOptions {
        pickFirst 'lib/armeabi-v7a/libpjsua2.so'
        pickFirst 'lib/armeabi/libpjsua2.so'
        pickFirst 'lib/x86/libpjsua2.so'
    }
}
matusalem
  • 2,461
  • 2
  • 26
  • 35
0

If you see the latest samples, they use wild cards to deal with all the duplicate .so files.

It is like:

pickFirst **

Like in this link.

Abhinav Saxena
  • 1,990
  • 2
  • 24
  • 55