Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

weex_sdk从0.18.0升级到0.20.0.1,开启debug模式程序崩溃,像是so文件引发 #1913

Closed
fanlvwen opened this issue Dec 14, 2018 · 17 comments

Comments

@fanlvwen
Copy link

1.js打包后在项目中运行没问题,旧版与新版皆正常
2.开启debug
String host = "192.168.2.236"; WEEXURL = "http://192.168.2.236:8088/weex/"; WXEnvironment.sDebugServerConnectable = true; WXEnvironment.sRemoteDebugMode = true; WXEnvironment.sRemoteDebugProxyUrl = "ws://" + host + ":8088/debugProxy/native/";
0.18.0正常:
gradle配置为:
compile 'com.taobao.android:weex_inspector:0.13.4' compile 'com.squareup.okhttp3:okhttp:3.4.1' compile 'com.squareup.okhttp3:okhttp-ws:3.4.1'
image

0.20.0.1崩溃:
gradle配置为:
compile 'com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0' compile 'com.taobao.android:weex_inspector:0.18.10' compile 'com.squareup.okhttp:okhttp:2.3.0' compile 'com.squareup.okhttp:okhttp-ws:2.3.0' compile 'com.squareup.okio:okio:1.0.1'
image
机型:华为
系统:8.0.0

@fanlvwen
Copy link
Author

weex_sdk0.20.0.1,相同配置下,app的gradle配置为
compile 'com.taobao.android:weex_inspector:0.18.68'
不闪退了,但是debug的浏览器页面上,仍然没有显示设备列表

@miomin
Copy link
Contributor

miomin commented Dec 14, 2018

请提供你的weex toolkit中weex debuger的版本号

@fanlvwen
Copy link
Author

image
但是我并未使用debugger,我仍然使用的weex-devtool
$ weex xbind debugx weex-devtool $ weex debugx

@fanlvwen
Copy link
Author

weex项目中启动debug使用的是
'weex debugx src -e index.vue'

terminal:
image

@erha19
Copy link
Contributor

erha19 commented Dec 17, 2018

@fanlvwen you'd better using weex debug command, but not the weex debugx command which source the old weex-devtool module.

@fanlvwen
Copy link
Author

@fanlvwen you'd better using weex debug command, but not the weex debugx command which source the old weex-devtool module.

1.我这个是多页面应用,调试的是整个文件夹,需要类似'weex debugx src -e index.vue'这样的命令,weex debug没有这个命令,只有weex debug src,这个命令打开的debug,比如说index.js超级大,而且index.vue中稍微改一个字,热更新都需要1分钟左右才在chrome上刷新页面

@erha19
Copy link
Contributor

erha19 commented Dec 17, 2018

@fanlvwen I will check the compilation problem, and I also suggest you using weex debug command to debug your page, if you want to compile pages more quickly, I suggest you using weex create [projectname] to create an official project, then put your source into the src (do not delete entry.js), then running npm start, it will open an browser for you to preview your page, you can also modify the configuration on config folder.

As a temporary solution, you can also using weex-devtool for build, weex-debugger for debug.

The built-in compile module on weex-debugger or weex-devtool will be removed soon as it can compile very limited content. Wait patiently for the new version of the weex debug tool, it will coming soon.

@fanlvwen
Copy link
Author

@fanlvwen I will check the compilation problem, and I also suggest you using weex debug command to debug your page, if you want to compile pages more quickly, I suggest you using weex create [projectname] to create an official project, then put your source into the src (do not delete entry.js), then running npm start, it will open an browser for you to preview your page, you can also modify the configuration on config folder.

As a temporary solution, you can also using weex-devtool for build, weex-debugger for debug.

The built-in compile module on weex-debugger or weex-devtool will be removed soon as it can compile very limited content. Wait patiently for the new version of the weex debug tool, it will coming soon.

谢谢回答!
新建项目,把自己项目的src拷贝过来,保留新的entry.js,运行npm run start 报错如下:
image

@fanlvwen
Copy link
Author

image
这个命令卡了十分钟了。。。

@fanlvwen
Copy link
Author

新建项目,直接npm run build:prod,没问题
加入10+vue文件,没问题,逐渐加入vue文件,当加到70+页面(包括子组件),这时候就会卡住不动了。

@erha19
Copy link
Contributor

erha19 commented Dec 18, 2018

@fanlvwen You can filter out some files that are temporarily unavailable,see config file on configs/config.js, and you can modify the entryFilter as you like.

@fanlvwen
Copy link
Author

是这样的,本身我已经有一个线上项目,而且是多页面的(加上子组件估计100+vue文件),按照你说的weex create一个新项目,
运行任何命令都正常。

然后,把线上项目的src整个拷过来。这是前提。

  1. 然后运行npm run start,报错如上面的一个图

  2. npm run build:prod无响应

  3. 猜测是src下vue文件太多,于是逐步拷贝到src下,当文件比较多的时候,出现情况2

@erha19
Copy link
Contributor

erha19 commented Dec 19, 2018

@fanlvwen

To fix this, we need to improve the compiler efficiency of the weex-loader, it will be handled on late, for now, you can use filter config makes files which are necessary to be compiled.

@fanlvwen
Copy link
Author

不好意思不太明白,src里所有的文件肯定都是要编译的啊

@erha19
Copy link
Contributor

erha19 commented Dec 19, 2018

@fanlvwen the files you develop now should be one or more than one, but should not be all of the files on src folder.

@fanlvwen
Copy link
Author

或者你能给我一个config参考吗?
我本意是把整个项目打包,用npm run buid可以,用npm run build:prod就不行。
image
这是用run build打出来的文件,然后压缩好放到android原生assets下运行

erha19 added a commit to weexteam/devtool-iOS-for-Apache-Weex that referenced this issue Jan 7, 2019
@YorkShen
Copy link
Contributor

It seems this issue is resolved, I will just close it.

Feel free to reopen it if you have other questions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants