不要轻易尝试 weexplus open as

2023-07-29,,

昨日使用 weexplust publish android 编译apk, 出现了一大堆错

 FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred evaluating root project 'portal-mobile-app'.
> A problem occurred starting process 'command 'bash'' * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org

不知道咋办,于是想把android 文件拷贝,使用android studio 进行apk 编译,

但是发现,根本就不是完整的android 项目

无法执行Gereate Signed Bundle/APK

无奈之下求助大佬,他说执行一下 weexplus open as

然后提示输入android studio路径,输入完成后

是可以编译apk了(然并卵,最终编译失败了)

但是接下来发现

麻麻蛋!

解决办法

运行 npm config list

将红箭头路径配置到 path中去

再次执行weex -V

可是vue -V 为何还是不行呢?

我就纳闷了,为什么还是不得行???没得办法,,,自己琢磨呗!想到上面配置的环境变量

于是索性去 C:\Users\Lenovo\AppData\Roaming\npm目录下一探究竟…

不去不知道,一去吓一跳,,,,

这文件夹里怎么才这几个…?看weexplus的安装时间确定执行weexplus open as命令后,他将我的weexplus卸载了(X的操作不得不说)。而这个npm 中为什么,没有其他的安装文件呢,譬如vue.cmd. 仔细想想发现是为了处理

weex create test-app Error: Cannot find module '../package.json' 这个问题把npm 干掉了温馨提示:小伙伴这个目录不要轻易删除呀

详情见这个博客weex create test-app Error: Cannot find module ‘…/package.json’

感谢小伙伴收看,故事结尾就是重装那些被意外删除的工具了,现在我自己都不晓得还有哪些,只有用到了再一一重新安装吧。

还有个坑

安装完vue ,C:\Users\Lenovo\AppData\Roaming\npm\node_modules目录下也有了vue文件夹(但是没有vue.cmd),但执行vue -V还不是内部命令,看网上有人能说c盘中查询vue.cmd 于是傻傻的我照做了,搜索了半天麻麻蛋什么也没找到!尴尬!

最后才明白是自己太菜:::npm install --global vue-cli 忘记了安装cli

C:\Users\Lenovo>npm install --global vue-cli

执行完成后

不要轻易尝试 weexplus open as的相关教程结束。

《不要轻易尝试 weexplus open as.doc》

下载本文的Word格式文档,以方便收藏与打印。