Skip to content

Content Tagged "npe"

Page 1 of 1

Content Tagged "npe"

NullPointerException - getInstrumentation().getContext()

March 11, 2015Category: Software
Here's a beginner mistake... The following code: Throws an exception: Attempt to invoke virtual method 'android.content.Context android.app.Instrumentation.getContext()' on a null object reference It took me some time to find out why: getInstrumentation() returns null in the constructor :) The…

All tags