【问题标题】:how to convert meteor to phonegap如何将流星转换为phonegap
【发布时间】:2014-07-08 10:13:43
【问题描述】:
我对 PhoneGap 的流星有疑问
教程:https://github.com/guaka/meteor-phonegap#meteor2cordovacoffee
我已将流星部署到网络http://angganc.meteor.com/
我想转换成android apk,我的问题是
anggaranc@anggaranc-To-be-filled-by-O-E-M:~/meteor-phonegap-master$ sudo ./meteor2cordova.coffee angganc.meteor.com --classname coba.meteor.com --appname "Meteorjs documentation" --versioncode 5 --versionname 0.6.3.1
Error: Cannot find module './build/Release/shell'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/anggaranc/meteor-phonegapmaster/node_modules/execSync/index.js:24:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/anggaranc/meteor-phonegap-master/meteor2cordova.coffee:11:12)
at Object.<anonymous> (/home/anggaranc/meteor-phonegap-master/meteor2cordova.coffee:4:1)
at Module._compile (module.js:456:26)
怎么了?
【问题讨论】:
标签:
javascript
android
cordova
coffeescript
meteor
【解决方案1】:
你探索过Meteor Rider吗?我已经尝试了其他几个,而这个对于使用 APK 部署我的 Meteor 应用程序最有用。
基本上,您只需照常按照步骤创建 Cordova 和 Meteor 应用程序,但在您的
index.html 为您的 PhoneGap 应用程序,您只需添加以下内容:
<head>
<meta name="viewport"
content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no"/>
<title>Meteor Mobile</title>
<!-- include the core cordova JS file for your app, like normal -->
<script type="text/javascript" src="cordova.js"></script>
<!-- jquery or zepto libraries, as a MeteorRider dependancy -->
<script type="text/javascript" src="js/zepto.min.js"></script>
<!-- basics for our phonegapapp (Native, on Device JS) -->
<script type="text/javascript" src="js/phonegapapp.js"></script>
<!-- Meteor Rider -->
<script type="text/javascript" src="js/meteor-rider.js"></script>
</head>
<body>
<div class="app">
<h1>Mobile Loading...</h1>
<div id="phonegapapp-test" style="display: none;">
<!-- put whatever native device testing you want here, easy to toggle in phonegapapp.js -->
</div>
</div>
<script type="text/javascript">
// use this to track what version your user's are running
var __MeteorRiderConfig__ = {
// Your local dev meteor server url
meteorUrl: "http://192.168.0.1:3000",
// track Cordova version, bump this after a `cordova update <platform>`
phonegapVersion: 3.4,
// make sure to bump this along with /www/config.xml version and build
// to update xcodes version number. AppStore also requires >= 1.0 on submission
phonegapAppVersion: '1.0'
};
// Start up the phonegap
phonegapapp.initialize();
</script>
</body>
看看吧,我想你会对它的易用性感到非常满意。