简体   繁体   中英

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 ...

1.- I add the platform

ionic cordova platform add android

2.- I build the app for the previous platform

ionic cordova build android

3.- I run the app in the physical device

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?

Try below steps:

  1. Close the Visual Studio Code
  2. Reboot your PC
  3. Open your project in 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.

Just delete folder "Plateforms" and run "ionic cordova run android" 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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