科尔多瓦不兼容的错误package.json无效 [英] cordova inappbilling error package.json is invalid

查看:75
本文介绍了科尔多瓦不兼容的错误package.json无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发基于Cordova的应用程序.

I am developing a cordova based app.

当我尝试添加此插件时,出现此错误

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

错误:无效的package.json

Error:Invalid package.json

https://github.com/poiuytrez/AndroidInAppBilling

我遵循了

这是我的代码

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

推荐答案

我按照以下步骤进行操作:

I followed the steps below to make it work:

  • 从github下载插件,并将展开的文件夹(AndroidInAppBilling-master)保存在C:\驱动器中

  • 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插件添加C:\ AndroidInAppBilling-master --variable BILLING_KEY ="TEST_BILLING_KEY"

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

在您的情况下,它会引发错误:Error: Invalid package.json,因为展开的文件夹名称是 AndroidInAppBilling-master 而不是 AndroidInAppBilling

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

如果要使用相同的命令使其正常工作,则将展开的文件夹重命名为AndroidInAppBilling.

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

这篇关于科尔多瓦不兼容的错误package.json无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆