I was doing this following these steps as mentioned in the link.
IInAppBillingService.aidl
file to your Android project.
(1) If you are
right click on the head of the project and create a new PACKAGE ... call the package com.android.vending.billing ....drop the aidl file in there to quiet the error.
Some food for thought: for those with an interest - when using someone's aidl file, the package name for both apps must be the same. google used com.android.vending.billing as their package name for their billing aidl interface, so you MUST also use the same package name in your app. This is the rule when using aidl.
Check that you have added billing library in your build.gladle under dependencies
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.billingclient:billing:1.1'
}
See the last line in the above code. Implementing 'com.android.billingclient:billing:1.1' solved same problem for me
For android studio users, this should be the structure:
Worked for me, according to this answer.