根据 创建你的第一个App 整理
安装codora
npm install -g cordova
创建第一个项目
cordova create hello com.example.hello HelloWorld
添加iOS和Android平台
1 | cd hello |
安装构建先决条件
检测: cordova requirements
安装JDK
1 | sudo add-apt-repository ppa:openjdk-r/ppa |
安装Android SDK
方法一(待尝试)1
sudo apt-get install android-tools-adb
方法二(尝试中)1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
./android update sdk --no-ui
# set path(wether )
vi ~/.zshrc << EOT
export PATH=${PATH}:$HOME/workspace/hello/android-sdk-linux/platform-tools:$HOME/workspace/hello/android-sdk-linux/tools:$HOME/workspace/hello/android-sdk-linux/build-tools/23.0.1/
EOT
source ~/.zshrc
# adb
sudo apt-get install libc6:i386 libstdc++6:i386
# aapt
sudo apt-get install zlib1g:i386
方法三1
2sudo apt-get install ubuntu-make
umake android