clever_trevor clever_trevor - 7 days ago 6
Android Question

Google In-App Billing in Eclipse error of IabHelper cannot be resolved to a type

I've been trying to implement Google In-App Billing into one of my Android apps by following http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample
but I get the error that "IabHelper cannot be resolved to a type" after following the steps for an "Existing Project". I've added a picture as well. enter image description here

Answer

Make sure you have followed step 3:

Add the helper classes from the /util directory of the TrivialDrive sample to your project. Remember to change the package name declarations in those files accordingly so that your project compiles correctly.

You need to copy all the classes under com.example.android.trivialdrivesample.util and put them in your project. IabHelper is one of them and seems to be what you are missing.

enter image description here

Comments