如何在Android项目中导入BoofCV?我已经看过这里了。我完全糊涂了。请给我一步一步的指导。谢谢你的帮助。
发布于 2016-05-03 15:37:58
将下面的行添加到app/build.gradle中应该可以做到这一点
compile group: 'org.boofcv', name: 'android', version: '0.23'用当前版本的任何内容替换0.23。
在最近的版本中进行更新,您需要执行以下操作:
api group: 'org.boofcv', name: 'boofcv-android', version: '0.30'发布于 2019-09-12 06:52:51
在Android中集成BoofCV时,我遇到了一些问题。我在这里张贴这些和它的解决方案,以便它将对其他人有用。
BoofCV Android支持集成文档链接 支持
在Android 中添加BoofCV
如果您只使用一个模块,可以将以下代码添加到app/build.gradle中
dependencies {
api group: 'org.boofcv', name: 'boofcv-android', version: '0.34'
}如果要使用多个模块,可以将以下代码添加到app/build.gradle中
dependencies {
['boofcv-android', 'boofcv-core'].each { String a -> api group: 'org.boofcv', name: a, version: '0.34' }
}与Android依赖项冲突
如果遇到冲突错误,则需要在app/build.gradle中添加以下内容
configurations {
all*.exclude group: "xmlpull", module: "xmlpull"
all*.exclude group: "org.apache.commons", module: "commons-compress"
all*.exclude group: "com.thoughtworks.xstream", module: "commons-compress"
}失败验证Dex错误
如果无法验证dex文件错误的方法处理类型7,则需要在app/build.gradle中添加以下内容
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}发布于 2020-02-24 23:24:38
对于那些尝试过但仍然不能使用Boofcv的人来说。
同时也要添加
dependencies {
api group: 'org.boofcv', name: 'boofcv-core', version: '0.31'
}我知道这听起来很明显,但我没有发现任何明确地说我需要这样做的东西。祝好运!
https://stackoverflow.com/questions/36888618
复制相似问题