-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhello-weex.html
317 lines (237 loc) · 25 KB
/
hello-weex.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!DOCTYPE html>
<html lang="en">
<!-- Head tag -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Description-->
<meta name="description" content="Hello, Weex!
Weex 是一套简单易用的跨平台开发方案,能以 web 的开发体验构建高性能、可扩展的 native 应用,为了做到这些,Weex 与 Vue 合作,使用 Vue 作为上层框架,并遵循 W3C 标准实现了统一的 JSEngine 和 DOM API,这样一来,你甚至可以使用">
<!--Author-->
<meta name="author" content="nepaul">
<!--Open Graph Title-->
<meta property="og:title" content="Hello,Weex!"/>
<!--Open Graph Site Name-->
<meta property="og:site_name" content="DesignBytes"/>
<!--Page Cover-->
<meta property="og:image" content=""/>
<link rel="icon" href="favicon/favicon.ico">
<!-- Title -->
<title>Hello,Weex! - DesignBytes</title>
<!-- Bootstrap Core CSS -->
<!--
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
-->
<link href="//lib.baomitu.com/twitter-bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link rel="stylesheet" href="/css/style.css">
<!-- Custom Fonts -->
<link href="//lib.baomitu.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<style>
@font-face{font-family:Lora;font-style:normal;font-weight:regular;src:url(//lib.baomitu.com/fonts/lora/lora-regular.eot);src:local('Lora'),local('Lora-Normal'),url(//lib.baomitu.com/fonts/lora/lora-regular.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/lora/lora-regular.woff2) format('woff2'),url(//lib.baomitu.com/fonts/lora/lora-regular.woff) format('woff'),url(//lib.baomitu.com/fonts/lora/lora-regular.ttf) format('truetype'),url(//lib.baomitu.com/fonts/lora/lora-regular.svg#Lora) format('svg')}@font-face{font-family:Lora;font-style:normal;font-weight:700;src:url(//lib.baomitu.com/fonts/lora/lora-700.eot);src:local('Lora'),local('Lora-Normal'),url(//lib.baomitu.com/fonts/lora/lora-700.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/lora/lora-700.woff2) format('woff2'),url(//lib.baomitu.com/fonts/lora/lora-700.woff) format('woff'),url(//lib.baomitu.com/fonts/lora/lora-700.ttf) format('truetype'),url(//lib.baomitu.com/fonts/lora/lora-700.svg#Lora) format('svg')}@font-face{font-family:Lora;font-style:italic;font-weight:regular;src:url(//lib.baomitu.com/fonts/lora/lora-italic.eot);src:local('Lora'),local('Lora-Italic'),url(//lib.baomitu.com/fonts/lora/lora-italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/lora/lora-italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/lora/lora-italic.woff) format('woff'),url(//lib.baomitu.com/fonts/lora/lora-italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/lora/lora-italic.svg#Lora) format('svg')}@font-face{font-family:Lora;font-style:italic;font-weight:700;src:url(//lib.baomitu.com/fonts/lora/lora-700italic.eot);src:local('Lora'),local('Lora-Italic'),url(//lib.baomitu.com/fonts/lora/lora-700italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/lora/lora-700italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/lora/lora-700italic.woff) format('woff'),url(//lib.baomitu.com/fonts/lora/lora-700italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/lora/lora-700italic.svg#Lora) format('svg')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-300italic.eot);src:local('Open Sans'),local('OpenSans-Italic'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300italic.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300italic.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:regular;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-italic.eot);src:local('Open Sans'),local('OpenSans-Italic'),url(//lib.baomitu.com/fonts/open-sans/open-sans-italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-italic.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-italic.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:600;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-600italic.eot);src:local('Open Sans'),local('OpenSans-Italic'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600italic.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600italic.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:700;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-700italic.eot);src:local('Open Sans'),local('OpenSans-Italic'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700italic.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700italic.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:800;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-800italic.eot);src:local('Open Sans'),local('OpenSans-Italic'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800italic.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800italic.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800italic.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800italic.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800italic.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:regular;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-regular.eot);src:local('Open Sans'),local('OpenSans-Normal'),url(//lib.baomitu.com/fonts/open-sans/open-sans-regular.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-regular.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-regular.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-regular.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-regular.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-300.eot);src:local('Open Sans'),local('OpenSans-Normal'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-300.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-600.eot);src:local('Open Sans'),local('OpenSans-Normal'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-600.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-700.eot);src:local('Open Sans'),local('OpenSans-Normal'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-700.svg#OpenSans) format('svg')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:800;src:url(//lib.baomitu.com/fonts/open-sans/open-sans-800.eot);src:local('Open Sans'),local('OpenSans-Normal'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800.eot?#iefix) format('embedded-opentype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800.woff2) format('woff2'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800.woff) format('woff'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800.ttf) format('truetype'),url(//lib.baomitu.com/fonts/open-sans/open-sans-800.svg#OpenSans) format('svg')}
</style>
<!-- <link href="//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css"> -->
<!-- <link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css"> -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Gallery -->
<!-- <link href="//cdn.rawgit.com/noelboss/featherlight/1.3.5/release/featherlight.min.css" type="text/css" rel="stylesheet" /> -->
<link href="//lib.baomitu.com/featherlight/1.3.5/featherlight.min.css" rel="stylesheet">
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-63590316-1', 'auto');
ga('send', 'pageview');
</script>
<meta name="generator" content="Hexo 6.3.0"></head>
<body>
<!-- Menu -->
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">DesignBytes</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/archives">Archives</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Main Content -->
<!-- Page Header -->
<!-- Set your background image for this header in your post front-matter: cover -->
<header class="intro-header" style="background-image: url('https://images.unsplash.com/photo-1452716726610-30ed68426a6b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=eb13d4961a078aca65cfa493a8026519')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading">
<h1>Hello,Weex!</h1>
<span class="meta">
<!-- Date and Author -->
Posted by nepaul on
2017-05-19
</span>
</div>
</div>
</div>
</div>
</header>
<!-- Post Content -->
<article>
<div class="container">
<div class="row">
<!-- Tags and categories -->
<div class="col-lg-4 col-lg-offset-2 col-md-5 col-md-offset-1 post-tags">
<a href="/tags/weex/">#weex</a>
</div>
<div class="col-lg-4 col-md-5 post-categories">
</div>
<!-- Gallery -->
<!-- Post Main Content -->
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<h1 id="Hello-Weex"><a href="#Hello-Weex" class="headerlink" title="Hello, Weex!"></a>Hello, Weex!</h1><blockquote>
<p>Weex 是一套简单易用的跨平台开发方案,能以 web 的开发体验构建高性能、可扩展的 native 应用,为了做到这些,Weex 与 Vue 合作,使用 Vue 作为上层框架,并遵循 W3C 标准实现了统一的 JSEngine 和 DOM API,这样一来,你甚至可以使用其他框架驱动 Weex,打造三端一致的 native 应用。<br> — weex 官网</p>
</blockquote>
<p>本文的主要目的是 <strong>帮助 WEB 开发者快速搭建 weex 开发环境</strong>,以下所有操作均基于 <strong>macOS Sierra</strong> 下进行(最好还是用 mac 开发,毕竟我们的需求是 <strong>跨平台</strong>,而且 mac 对 WEB 开发真的非常友好)。</p>
<h3 id="资源"><a href="#资源" class="headerlink" title="资源"></a>资源</h3><ul>
<li><a target="_blank" rel="noopener" href="https://weex.apache.org/">官网</a> :<strong>教程、手册、参考、工具和服务</strong>,建议四部分都看一遍,内容不长。</li>
<li><a target="_blank" rel="noopener" href="https://github.com/apache/incubator-weex">github</a></li>
<li><a target="_blank" rel="noopener" href="https://github.com/weexteam/weex-pack">weex-pack</a> 和 <a target="_blank" rel="noopener" href="https://github.com/weexteam/weex-pack/wiki">wiki</a> :weexpack 是新一代的weex应用工程和插件工程开发套件,是基于weex快速搭建应用原型的利器。它能够帮助开发者通过命令行创建weex应用工程和插件工程,快速打包 weex 应用并安装到手机运行,对于具有分享精神的开发者而言还能够创建weex插件模版并发布插件到weex应用市场。 使用weexpack 能够方便的在在weex工程和native工程中安装插件(官方说法)。</li>
<li>[非官方] 饿了么前端在知乎的专栏, <a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/ElemeFE">weex 入坑指南</a>:其他文章写得也很好,建议都读一遍。</li>
<li>[非官方] 知乎上的评价, <a target="_blank" rel="noopener" href="https://www.zhihu.com/question/37636296">如何评价阿里无线前端发布的Weex? - 知乎</a>:阿里还是在努力避免成为 Kissy 那样的悲剧,并且已经是 Apache 基金会项目了。</li>
</ul>
<h3 id="基础安装"><a href="#基础安装" class="headerlink" title="基础安装"></a>基础安装</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">### 利用 Homebrew 安装 node ###</span><br><span class="line">$ brew install node</span><br><span class="line">### 查看 node 及 npm 是否能正常工作 ###</span><br><span class="line">$ node -v</span><br><span class="line">$ npm -v</span><br><span class="line">### 国内墙的原因,建议用淘宝的 cnpm(https://npm.taobao.org/) ###</span><br><span class="line">$ npm install -g cnpm --registry=https://registry.npm.taobao.org</span><br><span class="line">### 以后可以直接用 cnpm 替代 npm 使用 ###</span><br><span class="line">$ cnpm i [package-name]</span><br><span class="line"></span><br><span class="line">### 安装 weex-toolkit(https://weex.apache.org/cn/guide/tools/toolkit.html), 已经集成了 weexpack ###</span><br><span class="line">$ cnpm install -g weex-toolkit</span><br></pre></td></tr></table></figure>
<h4 id="iOS-平台"><a href="#iOS-平台" class="headerlink" title="iOS 平台"></a>iOS 平台</h4><ul>
<li>安装 Xcode(AppStore),并且运行一次,使 Xcode 自动安装开发者工具和确认使用协议</li>
<li>安装 Xcode 项目的类库管理工具 <a target="_blank" rel="noopener" href="https://guides.cocoapods.org/using/getting-started.html">CocoaPods</a> <ul>
<li>由于墙,建议首先将 gem source 切换回 <a target="_blank" rel="noopener" href="http://gems.ruby-china.org/">ruby-china</a> 的:<code>gem sources --add http://gems.ruby-china.org/ --remove https://rubygems.org/</code></li>
<li>安装 CocoaPods: <code>sudo gem install cocoapods</code></li>
</ul>
</li>
</ul>
<h4 id="Android-平台"><a href="#Android-平台" class="headerlink" title="Android 平台"></a>Android 平台</h4><ul>
<li>安装 Android SDK:直接安装 <a target="_blank" rel="noopener" href="https://developer.android.com/studio/install.html">Android Studio</a>,通过 Android Studio 只能安装 SDK</li>
<li>配置 SDK 环境变量<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"> $ vim ~/.bash_profile</span><br><span class="line"> ### 文件中添加如下两行</span><br><span class="line"> export ANDROID_HOME=/xxx/Library/Android/sdk</span><br><span class="line"> export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools</span><br><span class="line">### 使配置生效</span><br><span class="line">$ source ~/.bash_profile</span><br></pre></td></tr></table></figure></li>
<li><strong>可能会遇到的问题</strong><ul>
<li>如果之前有安装过 android sdk,建议卸载,保证 adb 等版本的统一(我的系统之前就用 brew 安装过,卸载 <code>brew uninstall --force android-platform-tools</code>)</li>
<li>创建项目后,建议直接用 USB 连接真机调试<ul>
<li>用模拟器遇到了各种莫名奇妙的问题</li>
<li>真机需要开启 开发者权限。</li>
<li>可以用 <code>adb devices</code> 查看设备是否连接成功到 PC</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="创建项目"><a href="#创建项目" class="headerlink" title="创建项目"></a>创建项目</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">### 利用 weex-toolkit ###</span><br><span class="line">$ weex create hello-weex</span><br><span class="line">### 安装依赖 ###</span><br><span class="line">$ cd hello-weex && cnpm i</span><br><span class="line"></span><br><span class="line">### 添加 iOS 模板</span><br><span class="line">$ weex add ios</span><br><span class="line"></span><br><span class="line">### 添加 Android 模板</span><br><span class="line">$ weex platform add android</span><br><span class="line"></span><br><span class="line">### 添加 iOS 模板</span><br><span class="line">$ weex platform add ios</span><br></pre></td></tr></table></figure>
<h3 id="运行"><a href="#运行" class="headerlink" title="运行"></a>运行</h3><ul>
<li>运行 Android:<code>weex run android</code> ,会自动编译安装到真机</li>
<li>运行 iOS:<code>weex run ios</code>,会自动启动模拟机,并且编译安装到模拟机<ul>
<li>可能遇到的错误:导入 WeexATSDK.h 错误,解决方案:修改 <code>platforms/ios/Podfile</code> 文件中的 <code>pod 'weex-ATSDK', '0.0.1'</code> 为 <code>pod 'ATSDK', '0.0.1'</code></li>
</ul>
</li>
</ul>
<h3 id="Enjoy!"><a href="#Enjoy!" class="headerlink" title="Enjoy!"></a>Enjoy!</h3><p>第一个 weex 项目就是这么简单的跑起来。<br>本文的 weex 项目代码已经托管到 <a target="_blank" rel="noopener" href="https://github.com/nepaul/learn-web-development-by-codes/tree/master/hello-weex">github</a> 。<br>目前正在基于 一个开放的 API 服务写一个跨平台应用,后续会继续分享。</p>
</div>
<!-- Comments -->
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<hr />
<h3>Comments:</h3>
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a target="_blank" rel="noopener" href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
</div>
</div>
</article>
<!-- Footer -->
<hr />
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
<li>
<a href="https://github.com/nepaul" target="_blank">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- <li>
<a href="https://twitter.com/xsnepaul" target="_blank">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a href="https://medium.com/@nepaul" target="_blank">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-medium fa-stack-1x fa-inverse"></i>
</span>
</a>
</li> -->
</ul>
<p class="copyright text-muted"> © 2023 nepaul
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>, theme by <a target="_blank" rel="noopener" href="https://github.com/klugjo/hexo-theme-clean-blog">Clean Blog</a></p>
</div>
</div>
</div>
</footer>
<!-- After footer scripts -->
<!-- jQuery -->
<!--
<script src="/js/jquery.min.js"></script>
-->
<script src="//lib.baomitu.com/jquery/2.2.4/jquery.min.js"></script>
<!-- Bootstrap -->
<!--
<script src="/bootstrap/js/bootstrap.min.js"></script>
-->
<script src="//lib.baomitu.com/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!-- Gallery -->
<!-- <script src="//cdn.rawgit.com/noelboss/featherlight/1.3.5/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script> -->
<script src="//lib.baomitu.com/featherlight/1.3.5/featherlight.min.js"></script>
<!-- Disqus Comments -->
<script type="text/javascript">
var disqus_shortname = '';
(function(){
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
</body>
</html>