0

I'm delving into the world of Android app development, and I'm trying to implement Billing Client in my app, but I'm facing an issue. I'm following the steps from the documentation provided by Android Developers, everything seems fine until I implement the following code (exactly as it is in the documentation, without making any changes):

private PurchasesUpdatedListener purchasesUpdatedListener = new PurchasesUpdatedListener() {
    @Override
    public void onPurchasesUpdated(BillingResult billingResult, List<Purchase> purchases) {
        // To be implemented in a later section.
    }
};

"purchasesUpdatedListener" is returning the following error:

Class 'Anonymous class derived from PurchasesUpdatedListener' must either be declared abstract or implement abstract method 'onPurchasesUpdated(BillingResult, List)' in 'PurchasesUpdatedListener'.

I have searched for several solutions, but nothing has worked so far. Any suggestions you can give me would be greatly appreciated, as it is the last thing I need to complete my app.

Thank you for your time :)

0 Answers0