AlexDisler / cordova-plugin-inapppurchase

A lightweight cordova plugin for in app purchases on iOS/Android
316 stars 192 forks source link

InAppBillingService does not exist #38

Open epicfaace opened 8 years ago

epicfaace commented 8 years ago

I cannot build the app because "InAppBillingService does not exist". What exactly is the problem? Here is my console output:

/Users/asharv/Documents/ARCGIS/historyPrep/platforms/android/src/com/alexdisler/inapppurchases/IabHelper.java:33: error: package com.android.vending.billing does not exist
import com.android.vending.billing.IInAppBillingService;
                                  ^
/Users/asharv/Documents/ARCGIS/historyPrep/platforms/android/src/com/alexdisler/inapppurchases/IabHelper.java:103: error: cannot find symbol
    IInAppBillingService mService;
    ^
  symbol:   class IInAppBillingService
  location: class IabHelper
/Users/asharv/Documents/ARCGIS/historyPrep/platforms/android/src/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.
Note: Recompile with -Xlint:deprecation for details.
3 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileArmv7DebugJavaWithJavac'.
> 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.
epicfaace commented 8 years ago

Update: it now works when I copied the IInapppurchase.aidl file to /src/com/android/vending/billing manually. Is this a required step to make the app work?

crebuh commented 8 years ago

@epicfaace

I've got the excat same issue. Where can I find the IInapppurchase.aidl (I can just find a IInAppBillingService.aidl file) and the folder to copy it? (where is /src/com/android/vending/billing?)

edit

found the right folders, there are mentioned in the plugin.xml

ndeztea commented 6 years ago

anyone can give me the full path of this folder /src/com/android/vending/billing ? because it doesnt solve the issue, maybe i copy into wrong folder..

rpiccoli commented 6 years ago

I have the same issue.

desi-ivanov commented 6 years ago

Download IInAppBillingService.aidl from here and paste it in /platforms/android/CordovaLib/src/com/android/vending/billing/IInAppBillingService.aidl. This worked for me.

FlawaCLV commented 6 years ago

@EvolveYourMind what version of Cordova are you using ? Because this path doesn't exist for me...

junobartowski commented 6 years ago

@EvolveYourMind I get syntax error. platforms\android\CordovaLib\src\com\android\vending\billing\IInAppBillingService.aidl:7: syntax error

artuska commented 6 years ago

+1. Have the same issue.

Cordova — 7.1.0 Android — 7.1.0

Kainanchen commented 6 years ago

@junobartowski @artuska You can copy the file from its lab folder. cp ./plugins/cordova-plugin-inapppurchase/src/android/billing/IInAppBillingService.aidl ./platforms/android/CordovaLib/src/com/android/vending/billing/ If it doesn't work, download the file from here: https://github.com/AlexDisler/cordova-plugin-inapppurchase/tree/master/src/android/billing

rtm commented 6 years ago

I seem to have the same or a related problem, which occurred when I upgraded to cordova 8 and cordova-android 7:


 /home/rtm/repos/nims/blue/cordova/platforms/android/app/src/main/java/com/alexdisler/inapppurchases/IabHelper.java:103: error: cannot find symbol
    IInAppBillingService mService;
    ^
  symbol:   class IInAppBillingService
  location: class IabHelper
/home/rtm/repos/nims/blue/cordova/platforms/android/app/src/main/java/com/alexdisler/inapppurchases/IabHelper.java:230: error: package IInAppBillingService does not exist
                mService = IInAppBillingService.Stub.asInterface(service);
```                                               ^

Any ideas?
geshub commented 6 years ago

Hi, Any fix for using this plugin with cordova-android > 7 ?

sirg2003 commented 5 years ago

try this solution: https://stackoverflow.com/a/50993547 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\

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

muratcorlu commented 5 years ago

Why do we need to copy this file manually? Who is the main responsible for doing this?

I'm trying to build my app with Fastlane on Gitlab-CI. In which phase I should copy this file?

lilmnm-kamikaze- commented 5 years ago

if you look at the pull requests you can see one that fixes this.

xunholy commented 5 years ago

How is this still not resolved? Thanks to @sirg2003 for a simple solution.