Android
Requirement
Make sure the following configuration is completed:
- JDK >= 1.7 , and configure the environment variable
- Android SDK installed and configure the environment variable
- Android SDK version 23 (compileSdkVersion in build.gradle)
- SDK build tools version 21.1.2 (buildToolsVersion in build.gradle)
- Android Support Repository >= 17 (for Android Support Library)
- Weex SDK >= 0.16.X
Steps
The steps are as follows:
- Create an Android project. There is nothing to be specified, according to your habits to.
- At this moment, our publication is being reviewed by Maven. Once published, source dependency will be changed to AAR dependency.
Download source code, update build.gradle by adding the following dependencies:
compile project ':bridges:weex-bridge:android:weex_bridge'
- Register GCanvas Module and Component to your Weex Application.
WXSDKEngine.registerModule("gcanvas", GCanvasWeexModule.class); WXSDKEngine.registerComponent("gcanvas", WXGCanvasWeexComponent.class);
- Modify AndroidManifest.xml, add below line to acquire OpenGL ES features.
<uses-feature android:glEsVersion="0x00020000" />
iOS
Requirement
- Make sure that you have installed the iOS development environment and CocoaPods.
- Make sure that you have integrate WeexSDK
- Make sure that you have insalled the weex-toolkit in Nodejs 4.0+ for running case
Steps
- Install components with CocoaPods
pod 'WeexGcanvas' pod 'WeexPluginLoader'
WeexPluginLoader
would dynamic register Weex Module
and Component
of GCanvas, so we do not need to register manually.