Solution for theĀ IInAppBillingService.aidl error in eclipse.
If you try to add the Google library android for the in-app billing, you will have this error: interface IInAppBillingService should be declared in a file called com\android\vending\billing\IInAppBillingService.aidl.
We will see how to solve this issue.
The error
In its tutorial (http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample), Google explains :
To add the In-app Billing Version 3 library to your existing In-app Billing project:
Copy the IInAppBillingService.aidl
file to your Android project.
- If you are using Eclipse: Import the
IInAppBillingService.aidl
file into your/src
directory.
That is not exactly true. If you do that, you will have this error: IInAppBillingService should be declared in a file called com\android\vending\billing\IInAppBillingService.aidl.
The solution
- Right click on src and make a new package: com.android.vending.billing.
- Move the class IInAppBillingService.aidl in this new package (you can do that with the mouse).
- Result: you can build your project (if you are not on built automatically). You should see:
You can discover my android applications on my apps page: http://www.wakeupsun.com/applications/
Wakeupsun
Thanks for the help, but I can’t find the .aidl file.
Hello,
You can find it by making the section: Download the Sample Application here: http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample
Wakeupsun
Pingback: Android In-App-Billing Quick and Simple guide | RedAppz - Mobile Applications Design and Publishing