Weex produce SDKs to integrate to 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 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 to your app.
The environment required to build weex as follow:
$ANDROID_HOMEmust be set properly)
$ANDROID_NDKmust be set properly)
This article was tested in MacOSX system.
This script will build Android and iOS SDKs:
$ bash scripts/build_from_source.sh
This's may take a while. After that, you can look into
ios/sdk/Products for Web/Android/iOS SDK artifacts.
You can build all SDKs by one script as described above, or just build for a single platform you want 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
Make sure you have install gradle, see more details about ‘how to install gradle’ in gradle website. execute root folder of project
$ gradle wrapper --gradle-version 2.14.1
Create a Gradle setting file
$ echo 'include ":android_sdk"'>settings.gradle
Build the SDK
$ ./gradlew :android_sdk:assemble -PasfRelease
Now, you can see the artifacts under
android_sdk/build/output/. 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 found iOS library(Framework file) under