cordova run android相关问题
2018-03-26 本文已影响0人
绍重先
使用Cordova编译Android平台程序提示:Could not reserve enough space for 2097152KB object heap
大体的意思是系统内存不够用,创建VM失败。试了网上好几种方法都不行,最后这个方法可以了:
开始->控制面板->系统->高级设置->环境变量->系统变量
新建变量:
变量名: _JAVA_OPTIONS
变量值: -Xmx512M
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].

PS E:\Vue\cordovaTry> cordova run android
Android Studio project detected
ANDROID_HOME=F:\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_101
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Checking the license for package Android SDK Platform 26 in F:\Android\sdk\licenses
License for package Android SDK Platform 26 accepted.
Preparing "Install Android SDK Platform 26 (revision: 2)".
"Install Android SDK Platform 26 (revision: 2)" ready.
Installing Android SDK Platform 26 in F:\Android\sdk\platforms\android-26
"Install Android SDK Platform 26 (revision: 2)" complete.
"Install Android SDK Platform 26 (revision: 2)" finished.

下载系统镜像并使用avd manager设置虚拟机

