Some history:
NullPointerExceptions are generally downvoted as they mostly relate to simply not initiating something. The community got worn down by scouring through millions of users "find where I didn't initiate X" questions and created a canonical to point to which can guide you to finding what was null instead of being instantiated.
Whether this is proper or not can be up for discussion, but for the most part, that is why NullPointerException questions get downvoted.
As for your specific question,
What was the problem with that question? How was it unclear? Was I asking it incorrectly? How can I improve my question to avoid downvotes in the future?
Your question was fairly well written, and in the future I think you will do just fine asking questions. However, the main issue with this current question was that you didn't include which line of the code shown had the error up front (although you do mention it in comments later), as well, you didn't include the needed information of what connected to the line which had the error.
What you should have included was the position of the error, as well the definition of startActivity
and any explanation of scoping related to the two. In addition, a screenshot of the debugger paused at the line of error with the value expanded can also help.
By going through these steps, in general, you will probably find that you solve the issue on your own.