The solutions here didn't help me, but this link did.
If you have a library that's adding some android .so files –like libassmidi.so
or libgnustl_shared.so
– you have to tell gradle to pick just one when packaging, otherwise you'll get the conflict.
android {
packagingOptions {
pickFirst 'lib/armeabi-v7a/libassmidi.so'
pickFirst 'lib/x86/libassmidi.so'
}
}
I was having this issue when using a React Native app as a library in an Android project. Hope it helps