I was doing this following these steps as mentioned in the link.
IInAppBillingService.aidl
file to your Android project.
(1) If you are
In the /src directory, click File > New > Package, then create a package named com.android.vending.billing
Copy the IInAppBillingService.aidl file from /extras/google/play_billing/ and paste it into the src/com.android.vending.billing/ folder in your workspace.
Build your application. You should see a generated file named IInAppBillingService.java in the /gen directory of your project.