Meteor App.configurePlugin和Cordova案例

时间:2015-05-06 07:54:47

标签: cordova meteor in-app-purchase in-app-billing

我已经安装了一个带有通常语法的cordova插件

meteor add cordova:cc.fovea.cordova.purchase@3.10.1

此插件需要我已完成

的配置设置
App.configurePlugin('cordova:cc.fovea.cordova.purchase', {
  BILLING_KEY : MY_KEY
});

它有效。

现在我想尝试一下这个版本的最新版本,以便THIS我已经安装了一个tarball

meteor add cordova:cc.fovea.cordova.purchase@https://github.com/j3k0/cordova-plugin-purchase/tarball/2b75e86979b1cc24aaa87ad4c15a77414f70269e

当我尝试使用meteor build构建我的应用程序时,它可以

Error while building for mobile platforms: Error running                           
/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh
Failed to install 'cc.fovea.cordova.purchase':Error: Variable(s) missing: BILLING_KEY
at
/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:304:23
at _fulfilled (/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done
(/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch
(/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:557:44
at flush (/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)
Error: Variable(s) missing: BILLING_KEY
at
/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:304:23
at _fulfilled (/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done
(/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch
(/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:557:44
at flush (/Users/giggioz/.meteor/packages/meteor-tool/.1.1.3.1ui9e5i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)


Installing "cc.fovea.cordova.purchase" for android

正如您所看到的,它似乎没有看到我的

的配置设置
App.configurePlugin('cordova:cc.fovea.cordova.purchase', {
      BILLING_KEY : MY_KEY
    });

你能搞清楚为什么会出现这个错误吗?

提前致谢。

1 个答案:

答案 0 :(得分:3)

您应该使用此行来配置构建插件:

App.configurePlugin('cc.fovea.cordova.purchase', {
  BILLING_KEY : MY_KEY
});

不确定它是否可行但可能会有效。