Android报错提示Attempt to invoke interface method ‘int java.util.List.size()‘ on a null object reference

Posted 彬sir哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android报错提示Attempt to invoke interface method ‘int java.util.List.size()‘ on a null object reference相关的知识,希望对你有一定的参考价值。

android报错提示:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.arcsoft.arcfacedemo/com.arcsoft.arcfacedemo.activity.FaceManageActivity}: java.lang.NullPointerException: Attempt to invoke interface method \'int java.util.List.size()\' on a null object reference
在这里插入图片描述
在这里插入图片描述
可以很感觉的是:int java.util.List.size(),看来代码里的错误在哪里呢,可以发现:
在这里插入图片描述

return FaceServer.faceImgRegisterInfoList.size(),这代码为什么有错误呢
可以看到如下图:

以上是关于Android报错提示Attempt to invoke interface method ‘int java.util.List.size()‘ on a null object reference的主要内容,如果未能解决你的问题,请参考以下文章

appium_v1.4.16版本不适配android7.0系统,运行报错“Attempt to re-install io.appium.settings without first uninstal

Zookeeper报错Will not attempt to authenticate using SASL解决办法

Java反射报错“Attempt to get int field “i“ with illegal data type conversion to short“

同时操作两个数据库:报错Illegal attempt to associate a collection with two open sessions

virtualbox启动虚机报错:The VM session was closed before any attempt to power it on.

为什么连接HBase报错:Will not attempt to authenticate using SASL (unknown error)?