java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

GitHub | kristfal | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Android crashes in IabHelper.java

    GitHub | 8 months ago | kristfal
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  2. 0

    GitHub comment 52#277219350

    GitHub | 4 weeks ago | derrickroccka
    java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getPurchases(int, java.lang.String, java.lang.String, java.lang.String)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

      at com.alexdisler.inapppurchases.IabHelper.queryPurchases()
    2. com.alexdisler.inapppurchases
      IabHelper$2.run
      1. com.alexdisler.inapppurchases.IabHelper.queryPurchases(IabHelper.java:849)
      2. com.alexdisler.inapppurchases.IabHelper.queryInventory(IabHelper.java:571)
      3. com.alexdisler.inapppurchases.IabHelper.queryInventory(IabHelper.java:535)
      4. com.alexdisler.inapppurchases.IabHelper$2.run(IabHelper.java:630)
      4 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:818)
      1 frame