More than one file was found with OS independent path 'lib/armeabi-v7a/libavcodec.so'.To get this error i'm building ExoPlayer with 3 extensions together (using the manuals provided with extensions) on my Mac:
AV1 + VP9 is working OK, but after i compiling FFmpeg, i can't build the project anymore.
Maybe here is the reason why it says that duplicate is found:
https://developer.android.com/studio/releases/gradle-plugin#cmake-imported-targets
robolectricVersion = '4.4-SNAPSHOT'This version doesn't exist. When i change it to "4.4", then it is working OK.
Please release a hotfix for these errors.
I resolved both problems:
android {
sourceSets.main {
// The directory from which to pick the ffmpeg binaries.
jniLibs.srcDir 'src/main/libs'
}
}
robolectricVersion = '4.4-SNAPSHOT' to robolectricVersion = '4.4' in constants.gradle file.Removed this code from extensions/ffmpeg/build.gradle file:
Some of the other extensions have the line:
jni.srcDirs = [] // Disable the automatic ndk-build call by Android Studio.
which is missing the FFmpeg build.gradle. Perhaps we should be adding that, rather than removing what's there. @AquilesCanta - Do you know about this?
This version doesn't exist. When i change it to "4.4", then it is working OK.
4.4-SNAPSHOT works fine for me, even after invalidating caches. What repositories is your project using? Are you using google() and jcenter() as per the README? You might be able to fix things by making sure both are present, if that's not already the case. Either way, I don't think we actually need to use the snapshot any more; we can probably change to 4.4 as you suggest.
Hello,
Yes, i use both google() and jcenter(). Don't know why, but only "4.4" is working for me.
Some of the other extensions have the line:
jni.srcDirs = [] // Disable the automatic ndk-build call by Android Studio.
I've tried this, not working. Only removing helps to fix this issue.
By chance, I made a related simplification recently for other extensions but didn't submit the ffmpeg one. Thanks for reporting!
We have fixed the robolectric issue directly on release-v2. We also have fixes for the FFmpeg problem, which will land shortly in dev-v2 and go into a 2.12.1 release.
Actually, the FFmpeg fix can also go straight into release-v2, since it doesn't affect any of the pre-built modules that we distribute.