Naveen Kumar
Naveen Kumar

Reputation: 3818

IAB helper is not set up. Can't perform operation(On Android 2.3.3)

I implement In-app Billing Version 3 in App. InAppBilling is working fine on Android 2.3.5,4.0,4.1 and 4.2, But every time when i test the app on Android 2.3.3 the app is crash. All the classes of InAppBilling copied from my SDK (/extras/google/play_billing/). I cleared the cache from Google Play Store App but nothing happened.

This is crash log

java.lang.IllegalStateException: IAB helper is not set up. Can't perform operation: launchPurchaseFlow
at com.test.demo.inappbilling.util.IabHelper.checkSetupDone(IabHelper.java:782)
at com.test.demo.inappbilling.util.IabHelper.launchPurchaseFlow(IabHelper.java:372)
at com.test.demo.inappbilling.util.IabHelper.launchPurchaseFlow(IabHelper.java:338)
com.test.demo.AfterLoginScreen.onClick(AfterLoginScreen.java:215)
at android.view.View.performClick(View.java:2532)
at android.view.View$PerformClick.run(View.java:9277)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)

Upvotes: 4

Views: 3671

Answers (2)

Gautam
Gautam

Reputation: 1345

check google play service version,

 int status = GooglePlayServicesUtil
                        .isGooglePlayServicesAvailable(mContext);

                // Showing status
                if (status != ConnectionResult.SUCCESS) {
}  

Upvotes: 2

alecnash
alecnash

Reputation: 1768

I am quoting developer.android.com

If your device is running Android 3.0, In-app Billing requires version 5.0.12 (or higher) of the MyApps application. If your device is running any other version of Android, In-app Billing requires version 2.3.4 (or higher) of the Google Play application.

Upvotes: 0

Related Questions