移动端刷脸验证示例工程 demo 一直报错,不能
Chengpengfely 发布于2019-06-05 浏览:2980 回复:11
2
收藏

java.lang.RuntimeException: Duplicate class com.baidu.idl.facesdk.BDFaceUtils found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.BuildConfig found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceConfig found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceInfo found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceRecognize found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceSDK found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceSDK$1 found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceSDK$1CpuFilter found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceSDK$AlignMethodType found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceSDK$DetectMethodType found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

  Duplicate class com.baidu.idl.facesdk.FaceSDK$ImgType found in modules FaceSDK.jar (FaceSDK.jar) and facesdk.jar (facesdk.jar)

收藏
点赞
2
个赞
共11条回复 最后由sikaodelang回复于2020-03-11
#5silly丶小磊磊回复于2019-07-03

FaceSDk.jar   jar包名 和build.gradle 里面 引用的 不一样,我就是这样的错误

7
#10sikaodelang回复于2020-03-11

已经解决

api files('libs/FaceSDK.jar') 这个jar包名称大小写错误

import com.baidu.aip.face.stat.Ast;无法引用的

把implementation改成api

例如

dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api project(path: ':faceplatform')
}

那里引用不到就改哪里,实在不行就菜单File--Invalidate Caches  /Restart重启

已经跑起来了

1
#9earth小康_回复于2020-02-28

5楼说的对 facesdk模板中的gradle依赖的lib文件文件名

0
#8让一切归零136回复于2020-01-10

5楼是对的 api files('libs/FaceSDK.jar')    FaceSDK.jar原来demo程序是facesdk.jar和文件名不一样,识别大小写。

2
#7深圳中成星缘回复于2019-12-17

5楼说得对

0
#6獨角2013回复于2019-12-02

终于找到组织了, 报的错误是一模一样

0
#4啷个哩个啷586回复于2019-06-06

老铁 我这边是把faceplatform 引用的jar包注释呢 就好呢

0
#3756665228回复于2019-06-05

能告知是具体哪个sdk吗?最好截图示意一下是下载哪个sdk。看报错应该是安卓的。报错的意思重复的jar还是类的问题。

所用的开发工具。环境告知一下。让我这个不是搞安卓的试试看。

1
#2啷个哩个啷586回复于2019-06-05

哎呀 老铁 你和我报的一样的错啊

0
TOP
切换版块