Weex produce SDKs to integrate with iOS/Android/Mobile web applications. This file will cover how to build Weex from source. You can either use the script we provided or manually build from source step by step. See
README.md for further information about the Weex Framework.
Weex SDK includes 3 different SDKs to use in corresponding system/browser:
See our guide in our website to learn more about how to integrate Weex SDK into your app.
The environment required to build weex is:
$ANDROID_HOMEmust be set properly)
This article was tested in MacOSX system.
This script will build Android and iOS SDKs:
$ bash scripts/build_from_source.sh $NDK18_dir
$NDK18_dir should be the directory of NDK 18, otherwise the Android build would failed.
This may take a while. After that, you can look in
ios/sdk/Products for Web/Android/iOS SDK artifacts.
You can build all SDKs with one script as described above, or just build for a single platform step by step.
$ npm install --production
Install build tools:
$ npm run install:buildtools
$ npm run build:source
min version to Native SDK folder, which will be used by native SDK build.
cp packages/weex-js-framework/index.min.js ios_sdk/WeexSDK/Resources/main.js
cp packages/weex-js-framework/index.min.js android_sdk/assets/main.js
you have gradle installed, see more details about ‘how to install gradle’ on the gradle website.
edit local.propteries (in
then do buid
../gradlew clean assemble
You can now import the aar file to your android project.
Execute command below to compile iOS SDK:
$ xcodebuild -project ios_sdk/WeexSDK.xcodeproj -target WeexSDK_MTL
Then you'll find the iOS library(Framework file) under