After adding the cordova-plugin-inapppurchase to my project, building web assets for android platform fails:
<project_folder>\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:33: error: package com.android.vending.billing does not exist
import com.android.vending.billing.IInAppBillingService;
^
<project_folder>\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:103: error: cannot find symbol
IInAppBillingService mService;
^
symbol: class IInAppBillingService
location: class IabHelper
<project_folder>\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:230: error: package IInAppBillingService does not exist
mService = IInAppBillingService.Stub.asInterface(service);
^
Note: Some input files use or override a deprecated API.
FAILED
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILURE: Build failed with an exception.
Execute this in the root folder of your project (it copies the aidl
file to the proper folder)
ionic cordova platform add android
mkdir platforms\android\app\src\main\aidl\com\android\vending\billing\
copy platforms\android\src\com\android\vending\billing\IInAppBillingService.aidl platforms\android\app\src\main\aidl\com\android\vending\billing\
Many thanks to azarus for the solution
For Mac
mkdir -p platforms/android/app/src/main/aidl/com/android/vending/billing
cp platforms/android/src/com/android/vending/billing/IInAppBillingService.aidl platforms/android/app/src/main/aidl/com/android/vending/billing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With