license-gradle-plugin.jar may trigger errors, like
Connection reset or
peer not authenticated.
Maybe a network problem, try a proxy or VPN.
Weex’s native runtime support load image file from device’s disk, all you have to do set the file url like
file:///sdcard/image_new0.png. As to load image file in your project, Weex is not support yet.
This’s is caused by weex-toolkit’s dependency ‘http-server’, whose old version is not working well in chinese windows environment. We have fixed that, you should upgrade weex-toolkit before use that.
Best way to find out what’s happening is read debug log, you can follow this document to firgure out how to do that.
Weex uses JSCore in iOS and uses v8 in Android. So they both support ECMAScript 5 spec. Additionally, we do some polyfills in native environment:
- Timer APIs (
clearInterval) in iOS/Android
In Browser we contains a polyfill of
Promise temporarily. In the future developers can choose whether to import a polyfill by configurations.
You can also write ES6 syntax by
webpack. The loader will convert ES6 syntax into ES5 automatically.
If you want more ES6 polyfills you can import them into the JS Bundle as you like.
In Weex you may have some ways to import/require a component or a JS module. Take ES5 syntax for example:
require('xxx.js'): depends on a JS file
require('npm-module-name'): depends on a NPM module
require('xxx.we'): include a
wefile to register a Weex custom component
require('@weex-module/xxx'): depends on a Weex native module. Notice that it is supported only in
*.jsfile. If you want to use Weex native module in a
*.jsfile, temporarily you may write like this:
We will bring a better syntax design in the future.
line-height style in text component is different from h5 and Android, text value will be placed at bottom of line box because of iOS native api. We are trying to optimize it.
overflow style in android is
hidden and cannot be changed. This is the result of Android View framework. This only happens on Android, iOS will work as expected.
As Android NDK only supports Modified UTF-8, emoji is not support yet. Any attemp to use emoji may cause crash in case of lower than Android 6.0, and unexpected behavior when it is higher than 6.0. Only use Modified UTF-8, do not use emoji.
The deviceHeight and deviceWidth got in
this.$getConfig() is the real device width/height in pixels, not the ones with 750-adapted.
So you can use them to calculate width/height in real pixels.
Suppose you need to display a navigation bar of fixed 88 pixels, the bar’s height will be:
If you have 2 pages, A and B.
If you want, You can make a
repeat operation between Parent-Child components. But you must be strictly in accordance with the document syntax to write code. If there is no child component defined data, or there is no specify
props that need to be passed down. It will lead to the page does not render properly.
A correct example:
A wrong example：