cordova inappbilling error package.json is invalid

僤鯓⒐⒋嵵緔 提交于 2019-12-25 17:35:31

问题


I am developing a cordova based app.

When I am trying to add this plugin I am getting this error

Error:Invalid package.json

https://github.com/poiuytrez/AndroidInAppBilling

I followed this

Here is my code

cordova plugin add C:/Users/xxxxx/fbapp/plugins/AndroidInAppBilling --variable BILLING_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxx"

回答1:


I followed the steps below to make it work:

  • Download the plugin from github and saved the exploded folder (AndroidInAppBilling-master) in C:\ drive

  • Navigate to project root directory and execute the following command:

cordova plugin add C:\AndroidInAppBilling-master --variable BILLING_KEY="TEST_BILLING_KEY"

In your case it would have thrown the error: Error: Invalid package.json because the exploded folder name is AndroidInAppBilling-master not AndroidInAppBilling

If you wanna use the same command to make it work, then rename the exploded folder to AndroidInAppBilling.



来源:https://stackoverflow.com/questions/37697833/cordova-inappbilling-error-package-json-is-invalid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!