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.
The only advice I can give you is to re-check spelling of the directories in your src folder, if you put the file into /src/com/android/vending/billing/IInAppBillingService.aidl it should work
2018
app/build.gradle:
sourceSets {
main {
aidl.srcDirs = ['src/main/aidl']
}
}
or
sourceSets {
main {
aidl.srcDirs = ['src']
}
}
for IInAppBillingService.aidl
The other suggestions are good. Sometimes eclipse may just be weird though, and a project clean can fix it in this case.
I did what @j2emanue suggested (click New/Package, add "com.android.vendor.billing"), and I also added that directories to my file system (com/android/vendor/billing) then copied the file in it. Then, clicked Refresh on the project. Build, and it succeeded.
The structure that @David mentioned works fine in Android Studio 1.2.
Your path for the billing folder should look like:
[YOUR_APP_FOLDER]/app/src/main/aidl/com/android/vending/billing/IInAppBillingService.aidl
This is where you can check the IInAppBillingService.java generated file:
[YOUR_APP_FOLDER]/app/build/generated/source/aidl/debug/com/android/vending/IInAppBillingService.java
Good luck !