What does “java.lang.NullPointerException: Attempt to invoke virtual method '…' on a null object reference” mean, and how do I solve it? [duplicate]
问题 This question already has answers here : What is a NullPointerException, and how do I fix it? (12 answers) Closed 14 days ago . I'm getting the NullPointerException described in the title, but I don't understand how to use the information in the error message to debug it. How do I know what's null, and what are common causes of that? If you're seeing an error like java.lang.NullPointerException: Attempt to invoke virtual method '...' on a null object reference , this question aims to help