I have an application in which I added to application billing (v3). The published application seems to work fine (at least a small number) of the devices I tested. The code was confused by proguard, but I saved the corresponding proguard mapping.txt file.
Several purchases were made successfully, but I also received crash reports. Then I used retrace.bat to translate the accident stack trace and got the following result:
java.lang.NullPointerException
at com.mycompany.mygame.util.IabHelper.void startSetup(com.mycompany.mygame.util.IabHelper$OnIabSetupFinishedListener)(Unknown Source)
void dispose()
void launchPurchaseFlow(android.app.Activity,java.lang.String,int,com.mycompany.mygame.util.IabHelper$OnIabPurchaseFinishedListener,java.lang.String)
boolean handleActivityResult(int,int,android.content.Intent)
com.mycompany.mygame.util.Inventory queryInventory$337baa91(boolean,java.util.List)
void queryInventoryAsync$69bb631c(java.util.List,com.mycompany.mygame.util.IabHelper$QueryInventoryFinishedListener)
java.lang.String getResponseDesc(int)
int getResponseCodeFromBundle(android.os.Bundle)
int queryPurchases(com.mycompany.mygame.util.Inventory,java.lang.String)
int querySkuDetails(java.lang.String,com.mycompany.mygame.util.Inventory,java.util.List)
void logDebug(java.lang.String)
at com.mycompany.mygame.util.IabHelper.void startSetup(com.mycompany.mygame.util.IabHelper$OnIabSetupFinishedListener)(Unknown Source)
void dispose()
void launchPurchaseFlow(android.app.Activity,java.lang.String,int,com.mycompany.mygame.util.IabHelper$OnIabPurchaseFinishedListener,java.lang.String)
boolean handleActivityResult(int,int,android.content.Intent)
com.mycompany.mygame.util.Inventory queryInventory$337baa91(boolean,java.util.List)
void queryInventoryAsync$69bb631c(java.util.List,com.mycompany.mygame.util.IabHelper$QueryInventoryFinishedListener)
java.lang.String getResponseDesc(int)
int getResponseCodeFromBundle(android.os.Bundle)
int queryPurchases(com.mycompany.mygame.util.Inventory,java.lang.String)
int querySkuDetails(java.lang.String,com.mycompany.mygame.util.Inventory,java.util.List)
void logDebug(java.lang.String)
at com.mycompany.mygame.util.IabHelper$2.void run()(Unknown Source)
at java.lang.Thread.run(Thread.java:1019)
I'm a bit hazy about how to read stack traces, but I guess that maybe OnIabPurchaseFinishedListener had a null pointer ...? If so, how could this happen?
: , "startPurchaseFlow" , , , - ?
: :
public interface OnIabPurchaseFinishedListener {
public void onIabPurchaseFinished(IabResult result, Purchase info);
}