Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

After installing cordova-plugin-inapppurchase I am getting error related to Inappbilling #239

Open
vkrntteotia opened this issue Jul 29, 2018 · 5 comments

Comments

@vkrntteotia
Copy link

After i install inapppurchase plugin and its dependency then i tried to build the apk file by running:
ionic cordova build android --release

Console output

C:\Users\admin\qrScanner\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;
^
C:\Users\admin\qrScanner\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:103: error: cannot find symbol

IInAppBillingService mService;
^

symbol: class IInAppBillingService
location: class IabHelper
C:\Users\admin\qrScanner\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:230: error: package IInAppBillingService does not exist

            mService = IInAppBillingService.Stub.asInterface(service);
                                           ^

3 errors

FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileReleaseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 5s
27 actionable tasks: 1 executed, 26 up-to-date
(node:16868) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
C:\Users\admin\qrScanner\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;
^
C:\Users\admin\qrScanner\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:103: error: cannot find symbol
IInAppBillingService mService;
^
symbol: class IInAppBillingService
location: class IabHelper
C:\Users\admin\qrScanner\platforms\android\app\src\main\java\com\alexdisler\inapppurchases\IabHelper.java:230: error: package IInAppBillingService does not exist
mService = IInAppBillingService.Stub.asInterface(service);
^
3 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileReleaseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 5s
at ChildProcess.whenDone (C:\Users\admin\qrScanner\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:16868) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16868) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Type of product you are working with consumable/non-consumable/subscription

I am working over consumable products

Version of cordova

version is 8.0.0

Version of iOS/Android

android version 7.0.0

@thesayyn
Copy link

thesayyn commented Aug 1, 2018

i'm getting same error

@Chadori
Copy link

Chadori commented Aug 1, 2018

Use the plugin cordova-plugin-inapppurchase-fixed instead.

Just in case you are curious why this is.
Read the other Open/Closed Bug Reports and Pull Requests to know the reason.
So, if need be, you can make your own fork or support other forked versions of this cordova plugin.

Sample References:
#207 , #231 , and #208

@Chadori
Copy link

Chadori commented Aug 1, 2018

But in a nutshell::

This is a compatibility issue for Cordova CLI Version 7.0.0 and Cordova CLI Version 8.0.0.
Which is fixed by using the forked plugin instead.
Please, close afterwards when fixed.

@thesayyn
Copy link

thesayyn commented Aug 1, 2018

Thank you so much

@IvanLencina
Copy link

@ChadoriRebornXD Thank you, it solves the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants