note  [BUG] Cordova build
问题如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
D:\Levana2\MyApp>cordova build
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\levana.xue\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\levana.xue\AppData\Local\Android\Sdk
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/6.6.1/userguide/gradle_daemon.html
Process command line: D:\Levana.Xue\develop-tool\java-jdk\openjdk-8u41-b04-windows-i586-14_jan_2020\java-se-8u41-ri\bin\java.exe -Xmx2048m -Dfile.encoding=GBK -Duser.country=CN -Duser.language=zh -Duser.variant -cp D:\Levana.Xue\develop-tool\android-gradle\gradle-6.6.1\lib\gradle-launcher-6.6.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.6.1
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap


* 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
Command failed with exit code 1: D:\Levana.Xue\develop-tool\android-gradle\gradle-6.6.1\bin\gradle.BAT -p D:\Levana2\MyApp\platforms\android wrapper -b D:\Levana2\MyApp\platforms\android\wrapper.gradle

原因

由于内存不够导致

解决方案

Your system can not provide enough continuous memory space for the jvm and causes the problem.

Here is what works for me:

Add an environment variable GRADLE_OPTS with the value of -Dorg.gradle.jvmargs=-Xmx512m

You can use -Xmx1g if you have more memory space available.

link:https://stackoverflow.com/questions/30384375/vm-error-while-build-cordova-phonegap

note  Git 笔记

Git Gui dowload

问题


安装git desktop后,在cmd 使用git 命令,提示不是一个命令

在 C:\Users\[username]\AppData\Local\GitHubDesktop\app-2.2.1\resources\app\git\cmd
*注意username 是win系统登入名称(Win10)
找到以上path, 添加至系统环境变量

note  Linux 安装以及使用

下载 Linux系统

下载请点击:这里

由于 Linux系统版本较多,我选择的是 ubuntu

说明

阿里云镜像 https://opsx.alibaba.com/mirror


root 账号

新安装的 linux ubuntu 系统是没有root密码的,需要设定后使用

eg img

1
$sudo passwd root

文件夹/文件权限修改

参考

1
2
#把文件夹改为可读写
chmod -R 777 [dirName]

IP查看

1
2
//如果未安装需要安装
$ifconfig

命令行符号 “\”

linux-cmd-desc1.png

以”"结尾 (如上图)
该符号是告知命令窗口,该命令还没有输入完成,换行继续输入。常用于 cmd 命令过长时使用


note  vue 笔记

资源收集

打包时用于引入CND的方案
webpack-cdn-plugin

build时使用CDN遇到的问题1 - config.plugin

https://github.com/staven630/vue-cli3-config

1
2
3
4
5
config.plugin('html').tap(args => {
args[0].cdn = cdn
return args
})
// 报错: args[0] 没有定义

由于使用vue pages配置,按照以上方式使用CDN时,build出错

vue inspect –plugins // 使用该命令查看 plugin list

1
2
3
4
config.plugin('html-admin').tap(args => {
args[0].cdn = cdn
return args
})

使用以上代码替换即可解决,参考链接:click me