前段使用Android百度人脸识别,运行时出现:
Error: Program type already present: com.baidu.idl.facesdk.BDFaceUtils
原因是jar包冲突。
经网上搜索和测试,解决方法如下:
\faceplatform\build.gradle
原
dependencies{
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/facesdk.jar')
compile files('libs/ast.jar')
compile files('libs/baidu_license.jar')
}
改成
dependencies {
api files('libs/facesdk.jar')
api files('libs/baidu_license.jar')
api files('libs/ast.jar')
}
网友评论