人脸识别Android离线SDK常见问题和解答
Ta的回复 :java.lang.NullPointerException: Attempt to invoke virtual method 'com.baidu.idl.main.facesdk.FaceInfo[] com.baidu.idl.main.facesdk.FaceDetect.detect(com.baidu.idl.main.facesdk.model.BDFaceSDKCommon$DetectType, com.baidu.idl.main.facesdk.model.BDFaceImageInstance)' on a null object reference at com..manager.FaceSDKManager.personDetect(FaceSDKManager.java:983) at com..ui.face.FaceDepthTestimonyActivity.onClick(FaceDepthTestimonyActivity.java:369) at android.view.View.performClick(View.java:5204) at android.view.View$PerformClick.run(View.java:21170) at android.os.Handler.handleCallback(Handler.java:743) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:772) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662) 大家好,困扰了一下午,我移植sdk到我项目中,去图库获取图片返回后就报float ret = FaceSDKManager.getInstance().personDetect(bmp, secondFeature);有空对象 ,那么secondFeature在哪里进行赋值,求帮助