weex Android

```
weex run android
? This command need to install weexpack. Install now? Yes
{ Error: Cannot find module '../src/run/Web'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/zhongwei/.xtoolkit/node_modules/weexpack/bin/weexpack-run:7:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }
```

```
$ weex platform add android
Error: Current working directory is not a weexpack project.
```

> 个人理解weex-toolkit可以用来开发时调试,weexpack用作打包,但是怎么把weex-toolkit开发完成的文件放进weexpack进行打包呢

> 你只需要把你的vue 或者 .we文件放到src下面。

> 使用weex-toolkit脚手架的init是初始化一个vue project,而create才是初始化一个weexpack project。请确认一下使用方式,然后个人推荐工程使用vue去构建。

原来 weex init 与 weex create 创建的项目是有区别的

- weex init 创建的是 vue project
- weex create 创建的是 weexpack project


## 参考
- [Native Mobile Apps with Weex and VueJS 2.0 – Hacker Noon](https://hackernoon.com/how-to-create-a-weex-vue2-project-6b94981bee4e)
- [weex init 创建的项目如何打包到真机? · Issue #83 · weexteam/weex-toolkit](https://github.com/weexteam/weex-toolkit/issues/83)
- [weex-plugins/amap-running-app: a demo running app for weex-amap](https://github.com/weex-plugins/amap-running-app)
- [使用weex-toolkit创建工程后执行weex platform add ios报错 - SegmentFault](https://segmentfault.com/q/1010000008771985)
- [weex 学习日记 第三天 (大概是安卓打包的事最终版) - weexhelp](http://weex.help/topic/58dcbbf22668808722df284f)

posted @ 2017-06-18 12:31  和上一瓶矿泉水  阅读(1206)  评论(0编辑  收藏  举报