In-app billing (v3) – IllegalArgumentException: Service not registered:

I believe this is a bug in IabHelper.java.

In IabHelper dispose method, the following line,

            if (mContext != null) mContext.unbindService(mServiceConn);

should be changed to this.

            if (mContext != null && mService != null) mContext.unbindService(mServiceConn);

mService is only set once the Service has been registered, so checking it for != null will guarantee that service is indeed registered, before we try to unbind from it.

Leave a Comment