weexteam / pack-android-tools-for-apache-weex Goto Github PK
View Code? Open in Web Editor NEWpack-android-tools-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
License: Apache License 2.0
pack-android-tools-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
License: Apache License 2.0
在使用navagitor的时候无论跳转到什么路径只会去到首页,然后我通过android studio debug,
发现是下面这句报异常了,uri.toString()的值是"file://assets/dist/views/goods.js"
JSONObject initData = new JSONObject(uri.toString());
WXPageActivity
的部分(与原版一致,没有改动)public class WXPageActivity extends AbsWeexActivity implements
WXSDKInstance.NestedInstanceInterceptor {
//....
@Override
protected void onCreate(Bundle savedInstanceState) {
//....
if (uri == null) {
uri = Uri.parse("{}");
}
if (uri != null) {
try {
// 这里报异常
JSONObject initData = new JSONObject(uri.toString());
String bundleUrl = initData.optString("WeexBundle", null);
import { Utils } from 'weex-ui'
const navigator = weex.requireModule('navigator')
export default {
methods: {
push (path, fn = () => {}) {
if (Utils.env.isWeb()) {
this.$router.push(path) // 使用vue-router
} else {
const toUrl = weex.config.bundleUrl.split('/').slice(0, -1).join('/') + '/' + path + '.js' // 将a.js的绝对地址转为b.js的绝对地址
navigator.push({
'url': toUrl,
'animated': 'true'
}, fn)
}
},
pop (fn) {
if (Utils.env.isWeb()) {
window.history.back()
} else {
navigator.pop({
'animated': 'true'
}, fn)
}
},
getImgPath(imgName) {
let platform = weex.config.env.platform.toLowerCase()
let imgPath = ''
if (platform.indexOf('web') > -1) {
imgPath = `/static/img/${imgName}`
} else if (platform.indexOf('android') > -1) {
// android 不需要后缀
imgName = imgName.substr(0, imgName.lastIndexOf('.'));
imgPath = `local:///${imgName}`
} else {
imgPath = `../images/${imgName}`
}
return imgPath
}
}
}
The annotationProcessor 'com.taobao.android:weexplugin-processor:1.3' dependencies on com.alibaba:fastjson:1.1.27-android, but "Could not find com.alibaba:fastjson:1.1.27-android."
classpath 'com.taobao.android:weexplugin-gradle-plugin:1.1.3-SNAPSHOT'
这个包下载不了,模版里面给出的仓库访问不了,找不到这个包?
(node:6564) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 's tack' of undefined
at C:\Users\Administrator.xtoolkit\node_modules\weexpack\lib\build\android. js:179:21
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:6564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6564) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre cated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
用的是6.3.8
发现weex platform add android后,项目工程代码是生成成功了,但是weexplugin工程没有生成,run也就各种报错了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.