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.
3 Answers
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.
I have misunderstood where to copy the helper classes to? I am not able to read that from images provided. I have all of them changed accordingly to my app however still struggling on where to copy these files to. Neither able to understand that from https://developer.android.com/training/in-app-billing/preparing-iab-app.html#SetPermission as I do not have util folder in my app.
com.example.android.trivialdrivesample.util
to my project.IabHelper
is one of them and is what your code should resolve to. – Ken Wolf