Android studio 配置Javacv出现“More than one file was found with OS independent path”的解决办法
前言
最近在学习多媒体处理这一块,然后就找到javacv这个开源库,封装了计算机视觉处理所需要的全部库,很强大。
当前配置
- Windows 10 专业版 64bit
- Android Studio 3.1.4
- gradle 3.1.3
配置
按照开源库中gradle的配置方法。
看着配置就是这么简单,那么就点一下“sync now”,那就进入一段下载时间,下载完之后,点击运行,这里就是为了看配置能不能行。
出现配置问题
诶,果然是不行出现:
More than one file was found with OS independent path
'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-locale-l1-1-0.dll
看着意思是有重复的动态库?
尝试1
嗯,去c盘看看,嗯,找到很多(:з」∠) ,java安装位置下面就有两个,其他应用也有,怎么搞?想一下歪脑筋,删一个试试?
然而并没有什么效果……
那就只能放弃这种偏方了,毕竟也可能影响其他应用。
尝试2
搜索,自己找
1. 先去开源库Issues看看
找到了build failed,开心(〃’▽’〃)还是有好几个人遇到同样的问题,然而,找到正面回答这个问题的答案,但是看起来问题有点类似。
2. 尝试
既然是是找到重复的,那就只取其中一个就好了, 思路OK,试试。
加一个。
android {
packagingOptions {
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-locale-l1-1-0.dll'
}
}
构建一下试试。
确实没有相同的错误,但是⊙︿⊙有提示其他文件了,同样是window的动态库,经过若干次的构建,添加pickFirst,最终可以了 -(゜-゜)つロ乾杯~。
3. 结果
增加比较多的pickFirst,是我电脑装了一些其他软件(´・_・`)??还找不到原因。
packagingOptions {
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-locale-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/concrt140.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-utility-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-math-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-locale-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/linux-x86_64/libgomp.so.1'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-stdio-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-convert-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/macosx-x86_64/libusb-1.0.0.dylib'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-time-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/linux-x86/libgomp.so.1'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-math-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-environment-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-multibyte-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-runtime-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/msvcp140.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-stdio-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-string-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/vcruntime140.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-multibyte-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-filesystem-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-time-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/msvcp140.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-environment-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/concrt140.dll'
pickFirst 'org/bytedeco/javacpp/api-ms-win-crt-heap-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-heap-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-heap-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/vcruntime140.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-convert-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-string-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-runtime-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86/api-ms-win-crt-filesystem-l1-1-0.dll'
pickFirst 'org/bytedeco/javacpp/windows-x86_64/api-ms-win-crt-utility-l1-1-0.dll'
}
结语
这里也就是刚开始配置javacv,具体的时候还没开始,也不知道这能不能用。
这只是想到的一种解法,不知道其他解法,如果有其他有效的解法,评论区回一下,感谢。
上一篇: Android:More than one file was found with OS independent path 'res/values/values.xml
下一篇: Android - jni - error:More than one file was found with OS independent path ‘lib/*so‘
推荐阅读
-
Android:More than one file was found with OS independent path 'res/values/values.xml
-
Android studio 配置Javacv出现“More than one file was found with OS independent path”的解决办法
-
Android - jni - error:More than one file was found with OS independent path ‘lib/*so‘
-
Android问题集锦(十) - More than one file was found with OS independent path 'META-INF/DEPENDENCIES'