简体   繁体   English

如何在IONIC 3物理设备上运行我的应用

[英]How to run my app on an IONIC 3 physical device

I want to run my app on a physical device HUAWEI K2-L23 but I'm not getting results ... 我想在物理设备HUAWEI K2-L23上运行我的应用程序,但没有得到结果...

1.- I add the platform 1.-我添加平台

ionic cordova platform add android

2.- I build the app for the previous platform 2.-我为以前的平台构建应用程序

ionic cordova build android

3.- I run the app in the physical device 3.-我在物理设备上运行该应用程序

ionic cordova run android

doing the 3-step I get the following error: 做三步,我得到以下错误:

> cordova run android
Android Studio project detected
ANDROID_HOME=C:\Users\crisa\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_181
studio
Subproject Path: CordovaLib
Subproject Path: app
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 guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
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

安慰

I'm using Visual Studio Code ... with Ionic 3, I have Cordova installed and all its dependencies, I've also added _JAVA_OPTIONS as a system variable with the value -Xmx512M, I'm new using SQLite, that's why I want to show my app on a device physical, any help for me? 我正在将Visual Studio Code与Ionic 3配合使用,已经安装了Cordova及其所有依赖项,还添加了_JAVA_OPTIONS作为值为-Xmx512M的系统变量,我是使用SQLite的新手,这就是为什么我想要在物理设备上显示我的应用,对我有帮助吗?

Try below steps: 请尝试以下步骤:

  1. Close the Visual Studio Code 关闭Visual Studio Code
  2. Reboot your PC 重新启动电脑
  3. Open your project in Visual Studio Code Visual Studio Code打开您的项目
  4. Try again 再试一次

If above will not work then check this post on SO and try which one will work for you. 如果上述方法不起作用,请查看SO上的这篇文章,然后尝试哪一种对您有用。

Just delete folder "Plateforms" and run "ionic cordova run android" 只需删除文件夹“ Platforms”并运行“ ionic cordova run android” 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM