matusalem
matusalem

Reputation: 2531

Android Studio 3: useDeprecatedNdk no longer supported

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?

Upvotes: 0

Views: 2286

Answers (2)

Abhinav Saxena
Abhinav Saxena

Reputation: 2044

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.

Upvotes: 0

matusalem
matusalem

Reputation: 2531

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'
    }
}

Upvotes: 2

Related Questions