身份证识别在SDK中报空指针
182******41 发布于2018-11-21 浏览:814 回复:2
0
收藏

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at libcore.net.UriCodec.encode(UriCodec.java:132)
at java.net.URLEncoder.encode(URLEncoder.java:57)
at com.baidu.ocr.sdk.utils.HttpsClient$RequestBody.setStrParams(HttpsClient.java:52)
at com.baidu.ocr.sdk.utils.HttpUtil.post(HttpUtil.java:85)
at com.baidu.ocr.sdk.OCR$3.onResult(OCR.java:377)
at com.baidu.ocr.sdk.OCR.getToken(OCR.java:839)
at com.baidu.ocr.sdk.OCR.recognizeIDCard(OCR.java:374)
at com.huixiang.studentrecruitment.view.student.activity.MyDataActivity.onActivityResult(MyDataActivity.java:171)
at android.app.Activity.dispatchActivityResult(Activity.java:7137)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4917)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4964) 
at android.app.ActivityThread.access$1600(ActivityThread.java:221) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:158) 
at android.app.ActivityThread.main(ActivityThread.java:7225) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 

收藏
点赞
0
个赞
共2条回复 最后由182******41回复于2018-11-21
#3182******41回复于2018-11-21

解决了,详细说下问题吧:

我也是懒,不去看demo源码

 

0
#2182******41回复于2018-11-21

Android的

0
TOP
切换版块