问题1:
Can't create handler inside thread that has not called Looper.prepare()
解决1:
Looper.prepare();
问题2:
getMainLooper()' on a null object reference
解决2:
Looper.getMainLooper()
问题3:
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
解决3:
对这种情况一定要先判断是否为空,如果不为空再做强转
Integer tmp;
...
if(tmp) != null) { setValue(tmp.intValue()); }
问题4:Actually, there were zero interactions with this mock.